<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title>
</head>
<!-- 需要angular的代码必须包裹在ng-app的代码中 --><body ng-app><h1>使用angular实现双边数据绑定</h1><p><input type="text" placeholder="请输入你的姓名" ng-model="user.name"></p><p>hello<strong>{{user.name}}</strong></p><script src="./js/Angular.js"></script>
</body></html>
运行结果