Join the Stack Overflow Community
Stack Overflow is a community of 6.4 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up
angular.module('appCtrl',[],function($scope,$http,$interval){
     $scope.tick = 100;
     $interval(function(){
       $scope.tick -= 1;
     },1000);
})

how to implement a constructor function like this? and provide variables in it like $http and $scope? I tried, but this does not work like angular :/

enter image description here how does angular listens for change in $scope variable and recompiles it?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.