You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I put 'onEnter' in the state definition and register the state by 'UIRouter.stateRegistry.register(state)'.
We can try this in the 'react-hybrid/example/src/index.js'.
This won't work:
{
name: 'react', url: '/react', component: ReactComponent,
onEnter: (trans, state) => {
console.log(state.name);
}
},
index.js:1 Error: [$injector:unpr] Unknown provider: transProvider <- trans
(It seems like the code will put assume it's a provider named by 'argument+Provider').
This will work:
onEnter: ($transition$, $state$) => {
},
This issue only happens in 'react-hybrid', not in 'ui-router/react'.
The text was updated successfully, but these errors were encountered:
This is a workaround. Do it the angular way: inject the provider.
onEnter: ['$transition$', '$state$', (trans, state) => {
console.log(state.name);
}],
I put 'onEnter' in the state definition and register the state by 'UIRouter.stateRegistry.register(state)'.
We can try this in the 'react-hybrid/example/src/index.js'.
This won't work:
{
name: 'react', url: '/react', component: ReactComponent,
onEnter: (trans, state) => {
console.log(state.name);
}
},
index.js:1 Error: [$injector:unpr] Unknown provider: transProvider <- trans
(It seems like the code will put assume it's a provider named by 'argument+Provider').
This will work:$transition$ , $state$ ) => {
onEnter: (
},
This issue only happens in 'react-hybrid', not in 'ui-router/react'.
The text was updated successfully, but these errors were encountered: