Full stack Old driver Roadmap note--------(4) Angular JS

Source: Internet
Author: User

Level4

When we need to print multiple product name and product price, we want to reuse these 2 lines of code

If you want to pass in a string, use "" Inside contains '. Using Ng-include

After loading the page, use Ajax call to get the page with the Include

---------------------------Split Line-----------------------------

A better-to-include HTML template is to create custom directive

Use directive to replace ng-include!

Derective allows you to express behavior of your application!

Use custom directive to express behavior example:

Expressivness is the real power of using custom directive

Several kinds of custom directives:

How can we define custom directive?

The second part was an anonymous function which return a directive Defination object

Note that the dash in HTML translates to CamelCase in javascript!

Element directive

Attribute directive

Attribute Directive vs Element Directive

Angular make people easier to understand the behavior in HTML pages

Full stack Old driver Roadmap note--------(4) Angular JS

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.