0

I have two controllers and two models in angular. In my first view the controller combines the data provided by the two models and creates a combined view. I do not want to merge the data again in my second controller(if I want to use it again). How do I carry this combined data from first controller to the second?

Jyotirmoy Pan
  • 837
  • 2
  • 10
  • 28
  • 2
    possible duplicate of [Angular: Share data between controllers](http://stackoverflow.com/questions/21919962/angular-share-data-between-controllers) – joemfb Apr 01 '15 at 16:23
  • Use a model that is shared between both controller – Ronnie Apr 01 '15 at 16:25
  • 1
    read about service, factory, value, provider & constant in angular. You ll get an idea. – Nielarshi Apr 01 '15 at 16:28
  • Thank you guys for your valuable answers, I am sorry to say but I know these solutions. I want to integrate the data from two models only once in my session cycle. If I use a factory pass two different data sets and merge them it would be done. But I have to do the same in each controller. If I have a huge data i.e. I do not want to waste time to merge a large chunk of data again and again how am I supposed to do the same? – Jyotirmoy Pan Apr 02 '15 at 11:50

0 Answers0