标签:++ 方法 var $scope java div javascrip class highlight
var firstController = function ($scope){ $scope.name=‘张三‘; $scope.data={ name:‘李四‘, count:20 } $scope.count=0; $scope.$watch(‘name‘,function (newValue,oldValue) { ++$scope.count; if($scope.count>30){ $scope.name=‘已经大于30次‘; } }); $scope.$watch(‘data‘,function () { },true) }
标签:++ 方法 var $scope java div javascrip class highlight
原文地址:http://www.cnblogs.com/zhuj/p/7677041.html