Angular1 Angular Module

angular1

// Angular 1 - angular.module:

angular.module('myApp', []);

Notice the empty array, this is where we could put any other named modules as 
dependencies. Here we tell angular we're creating the module named 'myApp' with 
no dependencies. To get a reference to a module we drop the array and just call 
the module by name:

angular.module('myApp');
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License