What are AngularJS modules?
Question :
What are AngularJS modules?
AngularJS supports modular approach of programming. AngularJS modules are used to divide or separate the logic such as controllers, services, application etc. and keep the code clean. AngularJS module helps to link many components, so it is just a group of related components.
Generally in most of the applications we have a single entry point (main method) that instantiate and club together different parts of the application. In angularjs applications we don’t have that main method instead we have modules that specify how our application will be structured and bootstrapped.
Modules are defined in separate .js files and name them as per the module.js file, if these are kept in different file. Controllers always belong to a module.
Let us have two modules for an application, and we create them as
Application Module − used to initialize an application with controller(s). Application module is created by using the AngularJS function angular module
Controller Module − used to define the controller. These refer to the controller with
the ng-controller directive.
Similar Questions
What is ng-App directive in Angular JS?
What is a controller in Angular JS?
Explain the ng-model directive in Angular JS.
What are the Angular Modules?
Distinguish between Angular JS and JavaScript expressions.
What do you understand by Angular JS?
What are the advantages of using Angular JS?
Explain what are directives? Mention some of the most commonly used directives in AngularJS application?
What are events in JavaScript and its Types?
What is an operator and what are its types?
How can you create an Array in JavaScript?
What are the features of JavaScript?
Explain what is pop() method in JavaScript?
What is JavaScript?
What are AngularJS modules?
What are events? Where they are used.
What is form validation in JavaScript? How client side validation is different from server level validation.
What are Directives in Angular Js? Explain important directives.
What is Angular JS expressions? Explain with example
What is an operator and what are its types in JavaScript?