angular ,$interval 使用报错
html:
当前时间:<span ng-bind="timeshow"></span>
angularjs:
bpp.controller('testMyApp',function($scope,$rootScope,$location,$timeout,$interval){
$scope.timeshow = "2000-01-01 00:00:00";
$interval(function()
{
$scope.timeshow = new Date().toLocaleTimeString();
},1000);
}
erorr:
Error: Unknown provider: $intervalProvider <- $interval
at angular.js:2641
at Object.getService [as get] (angular.js:2769)
at angular.js:2646
at getService (angular.js:2769)
at invoke (angular.js:2787)
at Object.instantiate (angular.js:2819)
at angular.js:4639
at angular.js:4218
at forEach (angular.js:117)
at nodeLinkFn (angular.js:4203)