Very easy to do. Create a basic class (assuming you are using typescript) and make sure use the 'export' modifier. Create a variable in that class that will hold your global value. Add that class as a provider. If you don't know what that means, do a quick review - or let me know. Once you have that done, inject that class by including it as an argument in the constructor of any class where you intend to use it. Once again, if this means nothing to you, let me know. The global class you are now using is a singleton, so that allows for a great way to manage state in your app. If you don't know what a singleton is ... you know the drill.
-- 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 https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
