javascript - How do I fix this AngularJS error: Can't find variable: $interval -
modulet1.controller('sessionclock', function ($scope) { $interval(wtf, 5000); });
from error console:
error: can't find variable: $interval
i using angularjs 1.3.14. setting $scope
variables in controller , data-binding them in html works fine, until add $interval
or $timeout
line controller , error. what's going on?
modulet1.controller('sessionclock', [ '$scope','$interval', function ($scope,$interval) { $interval(wtf, 5000); }]);
this should solve problem. make sure have same order in injector , function().
Comments
Post a Comment