Angularjs Introduction.

Source: Internet
Author: User
1 <p>nothing here {' yet ' + '! '} </p>


Angularjs function: The JSON returned in the background as the model of the front-end. Use HTML for rendering in Angularjs.
Or a background view as a front-end model, and the entire front end is a view of the background.


The NG-APP directive marks the scope of the Angularjs script, and adding the Ng-app attribute in Anuglarjs script tags.
<script src= "Lib/angular/angular.js" ></script>

This line of code loads into the Angular.js script, which executes the Angular.js script when the browser loads the entire HTML page. The Angular.js script will look for an HTML tag that contains the NG-APP directive after it is run. The label defines the scope of the Angularjs app.

The expression of the double brace binding, the binding expression that tells Angularlarjs that the expression needs to be operated on, and inserts the result into the DOM. The DOM can be updated in real time as the result of the expression operation changes.
Angularjs expressions run only in scopes in Angularjs, not throughout the DOM.

<ul><li ng-repeat= ' phone in phones ' >{{phone.name}}<p>{{phone.snippet}}</p></li>< /ul>


Inside the <li> tag, the ng-repeat= ' phpne in phones ' statement is a angularjs iterator. This iterator tells Angularjs to use the first <li> tag as a template to create an LI element for each phone in the list.

Angularjs Introduction.

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.