<div ng-app="myApp" ng-controller="myClick"> <button ng-click="count=count+1">点我</button> {{count}} </div><script>var app=angular.module(‘myApp‘,[]).controller("myClick",function($scope){ $scope.count=0;})</script>
时间: 2024-10-12 23:26:08
<div ng-app="myApp" ng-controller="myClick"> <button ng-click="count=count+1">点我</button> {{count}} </div><script>var app=angular.module(‘myApp‘,[]).controller("myClick",function($scope){ $scope.count=0;})</script>