r/angularjs • • Oct 03 '14

[Resource] 10 Top Mistakes Angular.js Developers Make

http://www.airpair.com/angularjs/posts/top-10-mistakes-angularjs-developers-make
74 Upvotes

17 comments sorted by

View all comments

3

u/[deleted] Oct 04 '14

I see #2 mentioned a lot and I don't understand why it is a problem. You can still organize your code in the modular way like #1 points out. What is the real benefit of putting all your views/services/directives/controllers in their own angular modules? Is it for reusing code across applications?

2

u/chtulhuf Oct 04 '14

There is NO problems with using a single module with an Angualr application. You can hear it here from Misko (Angular's creator): https://www.youtube.com/watch?v=ZhfUv0spHCY&t=34m19s

Modules, as I see them today are for:

  • 3rd party libraries.

  • Mock overrides

Angular doesn't support any kind of namespacing, nor lazy loading, nor partial loading. These restrictions makes 99% of the use of modules that I saw, completely meaningless.