AngularJS Tutorial, two modules

Source: Internet
Author: User

ANGULARJS allows us to declare a module using the Angular.module () method, which accepts two parameters,
The first is the name of the module, and the second is a dependency list, which is a list of objects that can be injected into the module.

Angular.module (' myApp ', []);//Declaration module (this method is equivalent to the setter method of the Angularjs module, which is used to define the module.) )

1) The first parameter: name is the module, string variable.

2) The second parameter: requires contains a list of string variables, each of which is a module name, which relies on these modules and relies on the injector to pre-load before the module is loaded.

Angular.module (' myApp ');//This method is to get the application (referencing the Nyapp module) (this method is equivalent to the Angularjs module's Getter method, which is used to define the module.) )

AngularJS Tutorial, two modules

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.