Angularjs Small Knowledge Point one

Source: Internet
Author: User

Angularjs is created by Google Inc. and a community of developers. Its main advantage is to help users implement the necessary dynamic views in a Web application. It enhances HTML through native MVC (model-View-controller) functionality.

PS:MVC is a software architecture design pattern that separates performance from user interaction. Model---"Application of data + and data to interact with the method, view---" The data presented to the user, controller---"Bridge. A function that is used to add additional functionality to the scope of the view.

Ng-app---->> declares that all the content it contains belongs to this ANGULARJS application. Only elements that are contained by DOM elements with the Ng-app attribute are affected by ANGULARJS.

Ng-model---->> binds the Name property in the internal data model object ($scope) to the text input field. (PS: $scope object is a simple JavaScript object that can be accessed by the view and can interact with the controller)

<input ng-model= "name" type= "text" placeholder= "yourname" ><p>hello {{name}}</p>

Ng-controller---->> declares that all the elements it contains belong to a controller.

<div ng-controller="textcontroller">    <input ng-model="name  " type="text">    <p>hello {{name}}</p></div>

Scope: The glue between the view and the controller. That is, the view model.
$rootScope is the topmost of all $scope objects. An object that is a global scope.

Angularjs the tags used in the applied template:

directive: A property or element that enhances a DOM element to a reusable DOM component;

Value binding: Template syntax {{}} can bind an expression on a view.

Filters: Functions used in the view for formatting.

Form controls: Controls that are used to validate user input.

Angularjs Small Knowledge Point one

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.