I have a dilemma with merging two different scopes. Can someone suggest the most efficient method to achieve this? Here are details of the scopes in question; the second one originates from a service.
The initial scope retrieves information from the database using a PHP SLIM RESTful API.
Data.get('posts').then(function(data){
$scope.posts = data.data;
});
The secondary scope fetches data from the database through a service.
dataShare.getconfigs().then(function(data){
$scope.configs = data;
});
UPDATE:
Upon attempting to edit, only the $scope.posts are accessible within the modal. The $scope.configs data is not being passed through as intended.
$scope.open = function (p,size) {
var modalInstance = $uibModal.open({
templateUrl: 'views/postsEdit.html',
controller: 'postsEditCtrl',
size: size,
resolve: {
item: function () {
return p;
}
}
}); ...