So I had the same issue, but my setup is different. Just post it in case anyone comes across this. The first time sending an answer is so not sure if there is a better place for an answer that does not solve the OP answer, but still solves the variant of the question asked.
Application status
I have a parent state of "application" and a child state of "home". When a user logs in, they go through an "application" that allowed, and then redirected to the "home".
angular .module('common') .component('app', { templateUrl: './app.html', controller: 'AppController', bindings: { member: '=', organization: '=', } }) .config(function ($stateProvider) { $stateProvider .state('app', { redirectTo: 'home', url: '/app', data: { requiredAuth: true }, resolve: { member: ['AuthService', function (AuthService) { return AuthService.identifyMember() .then(function (res) { AuthService.setAuthentication(true); return res.data; }) .catch(function () { return null; }); } ], organization: ['AuthService', function (AuthService) { return AuthService.identifyOrganization() .then(function (res) { return res.data; }) .catch(function () { return null; }); } ], authenticated: function ($state, member) { if (!member) $state.go('auth.login'); } }, component: 'app', }); });
The solution for me was in bindings . I did this for the participant before, but forgot to do it for the organization, so that was my stupid problem.
Condition of the house
angular .module('components') .component('home', { templateUrl: './home.html', controller: 'HomeController', bindings: { member: '=', organization: '=', } }) .config(function ($stateProvider) { $stateProvider .state('home', { parent: 'app', url: '/home', data: { requiredAuth: true }, component: 'home', resolve: { 'title' : ['$rootScope', function ($rootScope) { $rootScope.title = "Home"; } ], } }); });
Again the solution was in bindings .
NOTE. I do not need to enter data into the controller.
function HomeController(AuthService, $state) { let ctrl = this; }
I donβt know why I do not need to enter directly into the controller so that it is available as ctrl.member and ctrl.organization .