Home > Web Front-end > H5 Tutorial > Angular-command collection

Angular-command collection

巴扎黑
Release: 2017-06-23 14:48:40
Original
1885 people have browsed it


2017-06-08

Angular directive.

ng-init: Initialization data

Use the = symbol in the attribute value. Variable values, user; separated, and cannot use var

# #ng-app: Enable angular application mode, a page can only appear once

It can have attribute values, but the project must be defined in js. If there is no attribute value, it can be used directly in the view

ng-model: Two-way data binding

##ng-bind: Another way to write interpolation, the interpolation symbol cannot be seen when the page is rendered

ng-repeat: Loop

ng-show: Whether to display

ng-show="true"

ng- hide: Whether to hide

Angular.module gets the

# of the application ##var arr = angular.module("mk",[])

The first parameter represents the app representation

The second parameter represents the dependency collection

Even if there is no Dependencies must also be written in empty arrays

controller defines the controller

arr.controller("kz",function($scope){})

The first parameter represents the name of the controller

The second parameter represents the factory method

There are no parameters by default

The scope is an empty object

The above is the detailed content of Angular-command collection. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template