2

Currently I have two ideas for passing data from one view to other in angulajs and using "ui.router".

  1. Set the data using local storage in one view and then retrieve that data on next view .(This does not seem to be an efficient way)
  2. Create a service and share the same object created using service with both the views. I have seen second idea example over here . But I don't know how services are able to share data between views. If any experienced Angularjs programmer can help me understand this concept it would be a lot of help to me. I have seen this angular-share-data-between-controllers it tell how you can share data but does not explain how it works behind the scene. I want to know how it works
Community
  • 1
  • 1
Amron
  • 197
  • 1
  • 9
  • 1
    possible duplicate of [Angular: Share data between controllers](http://stackoverflow.com/questions/21919962/angular-share-data-between-controllers) http://stackoverflow.com/questions/21919962/angular-share-data-between-controllers – Pankaj Parkar May 01 '15 at 10:49

0 Answers0