假设我有:
<h1>{{number}}</h1>
<input type="button" value="click me" ng-click="clicked()">
$scope.number = 0;
$scope.clicked = function() {
$scope.number += 10;
console.log($scope.number);
};
在 Javascript 控制台中,数字更改为 10,但在标题中它仍然是 0....
假设我有:
<h1>{{number}}</h1>
<input type="button" value="click me" ng-click="clicked()">
$scope.number = 0;
$scope.clicked = function() {
$scope.number += 10;
console.log($scope.number);
};
在 Javascript 控制台中,数字更改为 10,但在标题中它仍然是 0....