Closed dmoshfegh closed 10 years ago
This can be done easily in the app.js
. Check out this plunker:
http://plnkr.co/edit/azsKJnFJ0pYwBW0dGMFH?p=preview
Long answer: As angularAMD
depends on the resolve
property of $routeProvider
to provide on-demand loading of JS, you cannot configure the ng-controller
to be used in your index.html
in a RequireJS module. You need to define this controller using regular AngularJS syntax. The easiest way is to define it your app.js
but you can also define it as a normal AngularJS module and then inject the dependency into your app.
If you like angularAMD
, please consider to Star this project.
How to load service using ngload in this?
hello there, link you provided (http://plnkr.co/edit/azsKJnFJ0pYwBW0dGMFH?p=preview) is not working. plz check
Is there a way to use ng-controllers on the main site outside of the ng-view? Why: We want to display a dynamic navigation. Therefore we need a ng-controller on our index.html Atm. we resolved this issue with ng-include on the subsites and put the ng-view on the body...