global variable in angular js

49 views
Skip to first unread message

Viduthalai M

unread,
Feb 23, 2015, 9:04:31 AM2/23/15
to ang...@googlegroups.com
How to set global variable in angular js and use throughout app (eg curreny $)?
Default i am getting curreny as $. I need to change static as INR. Please Help me on this?

Sander Elias

unread,
Feb 23, 2015, 10:15:36 AM2/23/15
to ang...@googlegroups.com

Abdul Naseer

unread,
Mar 5, 2015, 4:44:28 AM3/5/15
to ang...@googlegroups.com

Hi Viduthalai M,

          For Global Scope variable you can use $rootscope directive .Check out this link.


Sander Elias

unread,
Mar 5, 2015, 6:08:42 AM3/5/15
to ang...@googlegroups.com
Abdul,

For most issues, use the $rootScope is a bad idea. It is an maintenance nightmare mostly. Each time a developer encounters a var he needs to change, he has to trace it back to its origins. This can be very difficult if the $rootScope is used!

Regards
Sander
Reply all
Reply to author
Forward
0 new messages