Closed
Description
Parent resolved resources can be used in child controllers, but seems to be not available to child resolve :
app.config(function ($stateProvider) {
$stateProvider.state('A', {
template: "State A : {{resA.value}} <ui-view>",
resolve: {
resA: function () {
return {
'value': 'A'
};
}
},
controller: function ($scope, resA) {
$scope.resA = resA;
}
});
$stateProvider.state('A.B', {
template: ":: State A.B {{resB.value}} ",
resolve: {
resB: function (resA) {
return {
'value': resA.value + '.B'
};
}
},
controller: function ($scope, resA, resB) {
$scope.resB = resB;
$scope.resAA = resA;
}
});
});
this raises an unknown provider resAProvider : http://jsfiddle.net/jmbarbier/6Qd4L/
this could be useful if possible to get resolved values available to child resolves..
Metadata
Metadata
Assignees
Labels
No labels