I have two applications, appA
for front end and appB
for admin end.
In appA
, I am building an array called queries
using a service through a controller. However, when I try to retrieve this array list in a controller in appB
, it appears empty.
Everytime appB
is loaded, the page gets refreshed.
Here is the service I am using to store and share the array:
.factory('myService', function() {
var queries = [];
var factory = {};
factory.addQuery = function(query) {
queries.push(query);
return queries;
};
factory.allQueries = function() {
return queries;
};
return factory;
});
Application A
angular.module("appA", ['ui.router', ..)
Application B
angular.module("appB", ['ui.router', ..)
Can anyone assist me with this issue?