It depends on how many times you want to use this function.
What I am doing at moment is writing a Class in it's own file (not tied to 
Angular just a POJO) and then having a service use that class.
Then any controller that needs it can then use that service and thus the 
Class inside.

I am quite new to Angular so I am not sure if this is the defacto way, but 
it's working :)

On Thursday, 20 August 2015 10:24:09 UTC+1, o x wrote:
>
> how to write a typescript global function for the html file in angular.. 
> so at the end i could do
> {{ Util.calcPrice(1,2) }}
>
> the Util is not part of the scope..
> or do i have to use rootScope for that ?
>
> thanks
>

-- 
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