Hello 小朋友
一:
<input ng-model="name" type="text" placeholder="Your Name"> <h1>Hello {{ name }}</h1>
二:
<body ng-app="myApp"> <div ng-controller="MyController"> <h1>Hello {{ name }}</h1> </div>
<script> var myApp = angular.module('myApp',[]); myApp.controller("MyController",function($scope) { $scope.name = "小朋友"; }); </script> </body>