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
thrownewError(`No such reload state '${(isString(options.reload) ? options.reload : (<any>options.reload).name)}'`);
// If we're reloading, find the state object to reload from
if (isObject(options.reload) && !(<any>options.reload).name)
throw new Error('Invalid reload state object');
options.reloadState = options.reload === true ? this.$current.path[0] : this.stateRegistry.matcher.find(<any> options.reload, options.relative);
if (options.reload && !options.reloadState)
throw new Error(`No such reload state '${(isString(options.reload) ? options.reload : (<any>options.reload).name)}'`);
... but when we process a redirected transition, we do not call transitionTo. instead, we run the transition directly:
This doesn't work:
because
reload: true
is never processed for a redirection.We process reload option in
state.transitionTo
:ui-router/src/state/stateService.ts
Lines 277 to 283 in e7a3481
... but when we process a redirected transition, we do not call transitionTo. instead, we run the transition directly:
ui-router/src/state/hooks/transitionManager.ts
Lines 108 to 110 in e7a3481
We should process the "reload" logic elsewhere; possibly in $state.target() factory function.
Note:
this.$current.path[0]
is the implicit root state so we can get it from stateRegistry, not $current.The text was updated successfully, but these errors were encountered: