I've upgraded my version of Angular to 1.7.8 and also upgraded angular-ui-router to 1.0.22.
After upgrade my resolved data from the router configuration isn't working (anymore).
Route configuration:
$stateProvider.state('app', {
views: {
'@' : {
templateUrl: CONFIG.BasePath + '/article/views/layout.html'
},
'article@app': {
templateUrl: CONFIG.BasePath + '/article/views/index.html',
controller: 'ArticleController',
resolve : {
settings: function() {
return {
someValue: ''
};
},
deps: ['$ocLazyLoad', function($ocLazyLoad) {
// other code
}]
}
}
}})
Controller:
function MapController ($scope, settings) {
console.log(settings);
}
MapController.$inject = [
'$scope',
'settings'
];
When I try to access it from the resolves object, it works, but this is not the way to go imho...
function MapController ($scope) {
console.log($scope.myResolves.$state$.views['article@app'].resolve.settings());
}
MapController.$inject = [
'$scope'
]