-4

can we load controller in angular.js dynamically using require.js OR any other way ? Kindly help me on this.

1 Answers1

0

Yes you. The best way I found is using angularAMD

Also check out ui-router-extras for a great sample that loads views, states and controllers dynamically using angularAMD and ui-router-extras Future States feature.

Finally, there is a good example here on StackOverflow about loading a controller with a dynamic name as well:
AngularAMD + ui-router + dynamic controller name?

Community
  • 1
  • 1
gaiazov
  • 1,908
  • 14
  • 26