I have separate login ng-app and index page ng-app So how would I get LoginData scope into index ng-app?
Asked
Active
Viewed 83 times
2 Answers
0
you create a service and inject it as dependancy in your two controllers to share data between them. a service is a singleton.
many source on google, search "angularjs share data between controllers" : a good solution here Share data between AngularJS controllers
-
i am not asking about between two controller – js-hint May 05 '15 at 08:06
-
sorry. misunderstand your need. maybe with cookies ? – AlainIb May 05 '15 at 08:18
-
Actually i bought an angular admin panel template..which works fine on index.html page..but i need to merge login module too...So i created Login app and merge with their app.. Now i want to pass login rootScope data into index app..and also need separate 'username' entity too..how can i approach too this problem ? – js-hint May 05 '15 at 09:17