AngularJS之data binding

Author: ChinSyun Pang
Weibo: arthinking_plus
Posted in: http://www.itzhai.com

Hello World

1
2
3
4
5
6
7
8
9
10
11
12
<!DOCTYPE html>
<!-- ng-app 声明所有被它包含的元素都属于AngularJS 应用 -->
<html ng-app>
<head>
<title>Simple app</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
</head>
<body>
<input ng-model="name" type="text" placeholder="Your name">
<h1>Hello {{ name | number:2 }}</h1>
</body>
</html>