Closed
Description
[Using ui-router v1.0.0-rc1]
I have a 2-factor registration dialog that uses a parent state with two child states. Retrieving the user information in a resolve in the first child state and using a binding to rename the resolve doesn't seem to work.
function userRegistrationConfig($stateProvider, STATES)
{
$stateProvider
.state(STATES.REGISTRATION, {
url: "/registration/:registrationID",
template: "<div layout-fill ui-view='registration'></div>",
redirectTo: STATES.REGISTRATION_START
})
.state(STATES.REGISTRATION_START, {
url: "/start",
views: {
"registration": "userRegistration"
},
params: {
registrationID: null
},
bindings: {
user: "registrationInfo"
},
resolve: {
registrationInfo: function (registrationService, $transition$)
{
return registrationService.getRegistrationInfo($transition$.params().registrationID);
}
}
})
.state(STATES.REGISTRATION_SMS, {
url: "/sms",
views: {
"registration": "smsVerify"
},
params: {
nextState: null
}
});
}
The above doesn't work. When I remove the bindings from the STATES.REGISTRATION_START
state and change the registrationInfo
to user
it all works.