I am developing angularjs project. I want to separate code as modularize. After seperating module wise, i want to combine that in a page. How i combine modules in a single page?
1 Answer
Ensure you've included the source of each module in your index.html:
<script src="/bower_components/module-1/dist/module-1.min.js"></script>
<script src="/bower_components/module-2/dist/module-2.min.js"></script>
Then in your index.js:
angular.module('myApp', [
'module1Name',
'module2Name'
]);
2 Comments
Gnana Soundari
Thank u richard. is there any good modular separation blog or pdf available? please send link if available.
Richard Snazell
No worries. Try this one: blog.safaribooksonline.com/2014/03/27/…