<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <script src="ajs/angular.min.js"></script> <script> var app=angular.module("mapp",[]); app.controller("cr",function ($scope,$interval,$timeout) { $scope.num=0; $scope.fun=function () { $interval(function () { $scope.num++; },1000); } }); </script> <div ng-app="mapp" ng-controller="cr"> <p>{{num}}</p> <button ng-click="fun()">大大</button> </div> <table> </table> </body> </html>
ANGULARjS自定义计时器
最新推荐文章于 2022-08-11 18:16:19 发布