It is required to define an Angular JS Module while you creating it. There is a method angular.module which is used when we want to define an Angular JS Module. The angular.module method returns a Module object that provides access to the most important features that AngularJS provides via the properties and methods. The module method supports the three arguments described below, although it is common to use only the
first two.
- name The name of the new module
- requires The set of modules that this module depends on
- config The configuration for the module, equivalent to calling the Module.config method
Following are The Members of the Module Object, which is used in Angular JS Module creation.
- animation(name, factory) Supports the animation feature
- config(callback) Registers a function that can be used to configure a module when it is
loaded.
- constant(key, value) Defines a service that returns a constant value
- controller(name, constructor) Creates a controller.
- directive(name, factory) Creates a directive, which extends the standard HTML vocabulary.
- factory(name, provider) Creates a service.
- filter(name, factory) Creates a filter that formats data for display to the user.
- provider(name, type) Creates a service.
- name Returns the name of the module.
- run(callback) Registers a function that is invoked after AngularJS has loaded and
configured all of the modules.
- service(name, constructor) Creates a service.
- value(name, value) Defines a service that returns a constant value.
.
The methods defined by the Module object fall into three broad categories: those that define components for
an AngularJS application, those that make it easier to create those building blocks, and those that help manage
the AngularJS life cycle. I’ll start by introducing the building blocks and then talk about the other features that are
available.
As this article is also a part of Concepts while working with Angular JS Application . So, you must read other tutorials in order to complete understanding to developing Angular JS Application. Since, we are going to learn several concepts. That's why I have broken this article into several small article. Which allow us to easily understand several Angular JS features and concepts. Following are the list of articles.
Summary: You should read above mentioned articles in order to completely understanding to developing an Angular JS application. This article is a part of Concepts while working with Angular JS Application, which is divided in to pieces of tutorials in order to understand easily. I hope you will like this article and find it useful.