AngualrJS是 JavaScript框架。html
<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>express
AngularJS扩展了html数组
AngularJS经过ng-directives扩展了html:好比:app
ng-app指令定义了一个angular的应用程序。框架
ng-model指令把元素值绑定到应用程序。spa
ng-bind指令把应用程序数据绑定到html视图。code
AngularJS 使得开发现代的单页面应用程序(SPAs:Single Page Applications)变得更加容易。cdn
AngularJS 表达式写在双大括号内:{{ expression }}。htm
AngularJS 表达式把数据绑定到 HTML,这与 ng-bind 指令有殊途同归之妙。或用{{}}或用ng-bind对象
AngularJS 表达式 很像 JavaScript 表达式:它们能够包含文字、运算符和变量。实例 {{ 5 + 5 }} 或 {{ firstName + " " + lastName }}
<div ng-init="x=1;y=5">
<p>总价:{{x*y}}</p>
<p ng-bind="x*y"></p>
</div>
带有对象的表达式、带有数组的表达式……
<div ng-init="person={name:'li',age:'18'}">
{{person.age}}
</div>
currency 格式化数字为货币格式。
filter 从数组项中选择一个子集。
lowercase 格式化字符串为小写。
orderBy 根据某个表达式排列数组。
uppercase 格式化字符串为大写。