Events on localStorage, I wasn't aware of that. Cool! This is an update to parts of a legacy application, which brings a lot of baggage to the project. For example, it can't be opened in two different browsers, because it only works in one specific version of a specific browser to begin with. Can you guess which one? :)
Also, the two windows are a child and a parent window, and they are the only ones that need direct communication. It's something like "if the user presses X in child window, element Y on parent window should change color". That change doesn't have to be propagated to the other clients. Other changes to the backend data can be reloaded periodically; it doesn't have to be updated in real-time for the app to work. 2014/1/16 Sander Elias <[email protected]> > Mattias, > > Localstorage has events (somehow everybody keeps forgetting this) it fires > an event when updated. so it's pretty easy to write a service that makes > use of this. This is making cross-windows communication a snap! > > However, I don't think you should go this way! As this is a solution for a > single user, using the same browser multiple times. If the users opens your > app in 2 different browsers, it won't fly. > Can't you add an backend communication server. The only responsibility of > this one, is telling who to update what. I guess it is as much work as the > localstorage solution. > > Regards > Sander > > -- > You received this message because you are subscribed to a topic in the > Google Groups "AngularJS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/angular/39rMPgshqEA/unsubscribe. > To unsubscribe from this group and all its topics, 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/groups/opt_out. > -- 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/groups/opt_out.
