双向数据绑定是AngularJS最强大也是最有特色的功能之一,如果这个不清除的话,那还得重新看看API,重新认识AngularJS,给你举个例子吧:
html:
{{greeting}}
js:
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.name = "Runoob";
$scope.sayHello = function() {
$scope.greeting = 'Hello ' + $scope.name + '!';
};
});