marcoslin / angularAMD

Facilitate use of RequireJS in AngularJS
http://marcoslin.github.io/angularAMD
MIT License
734 stars 171 forks source link

How i can use ngController directive #127

Closed gil0mendes closed 9 years ago

gil0mendes commented 9 years ago

Is there any way I can use the ngController directive?

marcoslin commented 9 years ago

If you are looking to use ngController to lazy load the controller, the answer is no. However, if you are using ngController to created nested controller, then yes.

Meaning, for a given page, you define a controllerUrl in which you create the main controller and all the nested controller needed. You can then use ngController directive to assign nested controller in your page.

gil0mendes commented 9 years ago

I created a directive to do that. I leave here the link in case anyone needs :) https://gist.github.com/gil0mendes/a1130bf601d5f6a769f3

marcoslin commented 9 years ago

Very interesting. Thanks for sharing.