To my horror my AngularJS page only loads in Firefox and Android-Chrome. These are the two environments I've been testing on, and Angular breaks (literally) everything else. I think it's an issue with routing like this one but I'm trying to figure out if there's an easier way than mutating Apache to get it to work. Should I use Node? Or is there an easy solution on my LAMP stack?
Thank you!
Related
I have spent some time on this. I have an HUGE Angular JS project ( Angular 1.6.5). I would like to move some components into Vue.
First thing we came across is Web Components: but AngularJS application must be on version 1.7.3 or higher.
We explored ngVue library but : . To use this https://www.nodenpm.com/ngVue/0.1.0/detail.html library in AngularJS, your application must be on version 1.7.9 or higher.
We have vue-custom-component which seems like basically wrapper to web components itself.
We are left with iframe, which we know works from the start but we were trying to avoid it.
Has anyone tried such thing already? Do we know of any other alternative library we can use to achieve the benefits of web-components in angularjs 1.6.
Thank you in advanc
js app that I use MEAN stack at that time I didn't know there was such of thing like mean stack. The problem im having is that I use a more common web approach for example I don't handle my routing in angular I use the traditional full page reload using node/express.js.
I have two question for the experience MEAN stack developer first does it worth it to change my routing to use angular so I can have a more traditional MEAN stack app and the second question is what would be a good file structure to my already builded application for example do i make my "/" route to send res.sendfile('./public/index.html');and then I can control the routing for my angular?
I'm just looking for any advice before I make the change. I don't think it would take me that long since I already use all the technologies.
thanks :)
You have the right idea, and I would encourage you to make the switch. First, like you said, it wouldn't take a lot of time to do. Therefore the cost of learning a new approach is minimal and you stand to lose nothing by it. I think you'll be happy with the results. Serve up a single page on / like you suggested, handle routing in angular instead of in the server, and keep your views in your /app folder, or whatever you like to use. The rest of your servers routes can serve as an API for AJAX requests for data.
I've been reading up on AngularJS lately (always used jQuery) and I'm starting to understand and like it. Normally I would build webapplications with Laravel. Now i'd really like to dig further and learn about connecting these two frameworks to build an awesome SPA. In this case, Laravel serves as a REST api and Angular handles the front end. This article and also this video helped me a lot, but still raises questions.
The biggest one (maybe very stupid) is: could the HTML/CSS/JS be converted to a native mobile app, for example with PhoneGap? Because that is what I'm wishing to achieve if possible.
Also, if this is possible, is it a good way or does it get too tricky?
This is still very new to me, just need some help on the way. I hope my question makes some sence, thanks in advance.
Currently I'm looking for a plugin/js that I can use to show my users a small walkthrough of my site. I have jquery and angular both running on my page.
I have been using Chardin.js (https://github.com/heelhook/chardin.js). This plugin works and is simple, however when i try to include angular elements chardin.js will not be able to find the elements to display.
SO I'm trying to find a way to integrate this plugin with angular. Unless there are some better plugins that work better for this in angular. Thanks!
I agree with #Ben_Coding,
Angular-Intro is pretty good, light-weight, and no dependency on jQuery.
I'm working on a big project. This project already has complicated structure. Most pages are generated on server-side with Twig.
Now we move the project to AngularJS.
It is not possible to use angular-way routing on whole project just now. But somewhere, it is necessary.
And here comes our trouble.
If I add 'ng-app' in html tag, for example, on some pages angular add hash in url.
And what is strange for me, that it's not everywhere.
On start page (project/profile9868766), url is clear as it is. But on some other (project/community/list), angular does something like that: project/community/list/#list .
And it is extremely undesirable.
There are no any angular routes, configured in $route service yet.
Please, help me to find out what causes that behavior, and what should i do to make all the things to go right way.
I want to add ng-app in html tag and not get any troubles with existing code, that may use hashes. And I want to use angular directives, controllers and other stuff, including $location service to set and track hashes on some pages. And later move everything to Angular and only after that start using Angular routes.
Thanks!
PS: English is not my native language, sorry about some weird constructions and mistakes. ))
Make sure to turn on html5mode
http://docs.angularjs.org/guide/dev_guide.services.$location
But the hash is inevitable on non-html5 browser.
The latest version of angular (v1.0.7) seems to have fixed this issue.