Hi O,

Inject it to the directives/controllers where you need it. You might be 
tempted to add it to rootScope, and while it will work, it’s a bad idea. 
You better insert a top-level controllerAs controller where you put this. 
that way, it’s always clear in your view where the finctionality is coming 
from. Something like : myTopController.calcPrice(a,b). Of coarse you are 
free to name your controller Util

Regards
Sander
​

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to