@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.
- Use only one controller, add everything in it, and use injection only for external libraries (ionic stuff, etc).
- In your index.html include your main controller first.
- Include your services. (By nature they will be needed for other controllers, so include these first).
- Include all other controllers.
- 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.