I'm trying to marshal a boiler plate for mobile app in angularjs. I plan it to be highly opinionated thus setting up some constrains for the app structure. Eventually bundling to an npm generator
I have come up with 2 generally found folder structures.
app
- directives
- controllers
- services
- views
- styles
The second one being
app
- login
- register
- notification
The latter being domain specific structuring. Which one is more agile and generic?
Definitely the second one!
In medium/big applications, with the "by functionality" structure, you can better organize and maintain your code.
Read this, very very helpful, style guide ;)