Modules
- Module contains Controllers
- Module in AngularJS
- The first parameter is the Module's name
- The second parameter is an array with the dependencies.
- The array can be empty []
Controller
- Controller in AngularJS
var MyController = function( $scope, $http){
//....
}
app.controller( "MyControllerName", MyController );
Include Module
To include the module in the HTML use ng-app
<body ng-app="myModule" >
</body>
Comentarios
Publicar un comentario