In Angular, a module is the main way to define an AngularJS app.
The module contains all of our application code.
An app can contain several modules and each module contains code for one specific functionality.
We can declare a module using the
When declaring a module, we need to pass two parameters to the method.
In the following code we use setter to define our module.
We can get module by using the same method with only one parameter.
angular.module('myApp')// fetches myApp
Angular modules have properties that we can use to inspect the module.
name (string)The name property on the modules gives us the name of the module as a string.
requires (array of strings)The requires property contains a list of modules (as strings) that the injector loads before the module itself is loaded.