Closed
Description
Dear all!
I'm having some issues with loading data in a child state. The problem is, that i need to resolve data in my child state which depends on an attribute of an object which was resolved in its parent state. So the hard coded objecttype parameter "APP" below is actually an attribute of an object which was loaded into scope by the parent state. Unfortunately I can't access the object in the parent scope using the following code: $scope.objectType....
$stateProvider
.state('configurationsWizard.components', {
url: '/components',
templateUrl: 'src/app/configurationsWizard/serviceComponents/components.tpl.html',
controller: 'ServiceComponentsController',
resolve: {serviceComponents: function ($stateParams, ServiceComponents, $q) {
var deferred = $q.defer();
ServiceComponents.query({language:'de',objecttype:'APP'},
function (response) {
deferred.resolve(response);
}
);
return deferred.promise;
}
}
})
How could I solve this problem? I must have missed something because I think it is a common problem to query detail data which depends on master data. Right??
Cheers and thank you in advance!
Michael
Metadata
Metadata
Assignees
Labels
No labels