How can I have one file per controller?

@Calendee
Nice tips, thanks for the post. My comments below:

If you do not have any cyclic dependencies in your architecture (which wouldn’t be the best design anyway), then your first approach works pretty well I think.

  1. Use only one controller, add everything in it, and use injection only for external libraries (ionic stuff, etc).
  2. In your index.html include your main controller first.
  3. Include your services. (By nature they will be needed for other controllers, so include these first).
  4. Include all other controllers.
  5. Include directives.

As I said unless you have cyclic dependencies somehow, you will have no injection problems, you can resolve anything just by reordering your script imports in your index.html if necessary.

My suggest we will organize code by split to the module, and inject it in the app.js file

This is detail my way: https://mymai91.github.io/ionic/2016/07/01/ionic-structure-code-for-project.html

Code demo: https://github.com/mymai91/mymaiApp