javascript - Best way to make object globally accessible and manipulable in complex AngularJS app? -


first of all, apologies if question duplicate (i know appears suspiciously one), have specific requirements , i'm not sure satisfied other solutions. might be, i'm not @ certain.

i'm building html5+css3+js web-app using angularjs deployed desktop application using node webkit. app enable running of competitive event, sorting teams , competitors points tournament progresses, several other tasks.

the app have multiple components need able access , edit tournament, locally store tournament (probably json object).

currently i'm planning on creating tournament single object, other objects (teams, competitors, judges) nested inside it. best way create tournament in way satisfies requirements?

i'll need able add new parts app later on , give components same ability (to view , update tournament object).

many thanks!

setup factory/service , return tournament object there, or methods work it. may inject service in whichever controller want have access it. may define scope variables reference tournament object make accessible app's directives.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -