7
I have several modules with Angularjs
angular.module('modulo1', ['ngTable']);
angular.module('modulo2', ['ngTable']);
angular.module('modulo3', ['ngTable']);
window.app = angular.module("app", ['ngRoute','modulo1','modulo2','modulo3']);
And within each module, I have multiple controllers/filters/services...
Well, it gets many files, example:
<!-- Load app main script -->
<script src="app/app.js"></script>
<!-- Load services -->
<script src="app/services/placesExplorerService.js"></script>
<script src="app/services/placesPhotosService.js"></script>
<script src="app/services/placesDataService.js"></script>
<!-- Load controllers -->
<script src="app/controllers/placesPhotosController.js"></script>
<script src="app/controllers/placesExplorerController.js"></script>
<script src="app/controllers/userContextController.js"></script>
<script src="app/controllers/myPlacesController.js"></script>
<script src="app/controllers/navigationController.js"></script>
<script src="app/controllers/aboutController.js"></script>
<!-- Load custom filters -->
<script src="app/filters/placeNameCategoryFilter.js"></script>
<!-- Load custom directives -->
<script src="app/directives/fsUnique.js"></script>
Well, I only have a few, and if I had 10 modules and 20 controllers, that’s 200 files to load....
How could I solve this problem? Does Angularjs have something to solve this problem? PS: Without using Requirejs, I opt for any other Fw, less requirejs
a very interesting resource. Even more than AMD, but could you transcribe at least part of the solution to, if the link is unavailable someday, the answer will not be lost. Just don’t forget to quote the source.
– Caputo
You can put the Angularjs CDN globally and use Browserify only for your solution.
– ralfting