For some reason, my resolvedData is not seeing by controllers when using multiple named views (angular-ui ui-router). Has anyone faced this issue?
$stateProvider
.state('page',{
abstract: true,
templateUrl: ...,
controller: abstractController
})
.state('page.index',
url: '/page',
resolve : {
resolvedData: function(CONSTANTS){ return CONSTANTS.data;}
},
views: {
home: {templateUrl: ...,
controller: function(resolvedData){
....
}
},
list: {templateUrl: ...,
controller: function(resolvedData){
....
}
},
edit: {templateUrl: ...,
controller: function(resolvedData){
....
}
}
}
)
The error it gives me is: Error: [$injector:unpr] Unknown provider: resolvedDataProvider <- resolvedData. It is somehow interesting because it happens only in one of the views but not in the others.