angularjs - Loading controllers in angular single page application -


i developing small spa angularjs. have followed best practices described in adnan kukic post directory structure. application includes around 10 different controllers , index file looks clean use of routing , partials. problem have have including controller files in header section of index file like:

<script src="app/components/home/homecontroller.js"></script> <script src="app/components/blog/blogcontroller.js"></script> <script src="app/components/detail/detailcontroller.js"></script> 

i'm sure there better way of including these script files. should use module loader requirejs or there more simple solution? way, because of small size of application, don't care if solution addresses lazy-loading or not.


Popular posts from this blog