Wednesday, July 12, 2017

What is angularjs modules?

An Angular js modules represent an application and it is a container for different part of application. It is a main() method in your application. Module is created by using the angular js function like:

<div ng-app="myApp">...</div>

<script>
var app = angular.module("myApp", []); 

</script>

You will notice that angular.module("myApp", []) are having two parameters.
The first parameter represents the name of module and the second parameter represents the dependency which are associated with that module.

Note: A module can depend on another module also

No comments:

Post a Comment