marcoslin / angularAMD

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

Modulaize your app #144

Closed stevezau closed 9 years ago

stevezau commented 9 years ago

Hi,

I've been reading issue https://github.com/marcoslin/angularAMD/issues/45 and i want to clarify.

When using angularAMD you are expected to register controllers etc via the app.register function. You cannot register new modules? So, using angularAMD i cannot split my application into several modules?

Is that a correct statement?

marcoslin commented 9 years ago

45 is a bit old so please follow the updated syntax per:

https://github.com/marcoslin/angularAMD#creating-a-module

If you split your app into modules, you can use ngload to load the angular module you created.

Personally, I no longer create modules as all my reusable code are in form of .factory or .service and I would just load them as needed.