Issues are arising with the controller not retrieving data correctly from the factory to display in the view. When all the data was stored in the controller, it worked fine. However, upon transferring it to the factory, the data no longer showed on the view. It seems like there might be a problem either with how the controller is calling the factory data or how the factory itself is defined, but it's unclear which one is causing the issue.
Controller:
app.controller('dbCtrl', ['$scope', 'myfactory', function($scope, myfactory) {
myfactory.success(function(data) {
$scope.test1 = results[0].data;
$scope.test2 = results[1].data;
$scope.test3 = results[2].data;
});
}]);
Factory:
app.factory('myfactory', ['$http', function($http, $q) {
$q.all([
$http.get('/url1'),
$http.get('/url2'),
$http.get('/url3')
]).then(function(data) {
return data;
})
}]);