I want to make a function being called in a certain interval of time inside the constructor. But I don't want to write the function inside the $interval statement because it's a little big. So I wanted to make something like this:
this.$interval(this.getSomething(), 1000);
And the initialize it outside of the controller's constructor:
getSomething = function getSomething(){
...
};
But it gives me an error of TypeError: fn is not a function When it seems to me as a function... Any suggestions?