<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="https://cdn.staticfile.org/angular.js/1.4.6/angular.min.js"></script>
</head>
//ng-init属于单向数据流向 用来初始化档期那作用域的变量
<body ng-app ng-init="username='tom'">
//ng-model属于双向数据绑定 username绑定输入框里的值
<input type="text" ng-model="username">
//表达式只是为了显示
<p>姓名:{{username}}</p>
<input type="text" ng-model="username">
<p>姓名:{{username}}</p>
</body>
</html>