ui-router icon indicating copy to clipboard operation
ui-router copied to clipboard

Child state not Inheriting resolved dependencies from parent state

Open sijintv opened this issue 9 years ago • 1 comments

Here is my code

$stateProvider
        .state('admin', {
            abstract: true,
            templateUrl: "views/common/content.html",
            resolve: {
                channel: function($stateParams){
                    return $stateParams.id
                }
            }
        })
        .state('admin.dash',{
            url: "/dash",
            templateUrl: "views/admin/admin_dash.html"
       })

and i have many controllers for this admin_dash.html view using ng-controller. And in any of these controllers (child) i am not able to inject 'channel' which is the resolved dependency of the parent state, which should be inherited. StackOverflow Question : https://stackoverflow.com/questions/47616637/child-state-not-inheriting-resolved-dependencies-from-parent-state

sijintv avatar Dec 03 '17 09:12 sijintv

Looks like your stackoverflow was answered. Only controllers that are "owned" by ui-router states are injected with resolve values.

christopherthielen avatar Dec 21 '17 02:12 christopherthielen