Angular Ng-view Or Ng-include Not Working
I've been working on one of the courses on Coursera for learning full stack web development (preview ver), and have been facing some troubles with ng-view and ng-controller. I don
Solution 1:
How do you access the site?
Are you adding the hash "#" next to the index.html location?
I mean, if you run this at localhost, inside a folder:
http://localhost/folder/#/contactus ?
Remember that AngularJS uses the hash to detect routes.
Solution 2:
You did not mention the version of angular. The latest version of angular needs #! before the second half of the URL and not just #
So,
<ahref="#/aboutus"> About</a>
Won't work. You will have to change it to
<ahref="#!/aboutus"> About</a>
and it would work.
Post a Comment for "Angular Ng-view Or Ng-include Not Working"