We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, In my demo, I did this: index.tsx:
ReactDOM.render( <UIRouter router={router}> <div> <h1>Dynamic Example</h1> <UIView /> </div> </UIRouter>, document.querySelector('#root'), );
router.config.ts:
export const router = new UIRouterReact(); const plugins = [ servicesPlugin, hashLocationPlugin, ]; plugins.forEach(plugin => { router.plugin(plugin); }); // Register the initial (eagerly loaded) states states.forEach((state) => router.stateRegistry.register(state));
When I call
let num = 1; const DynamicExample: ReactStateDeclaration = { name: 'dynamic', url: 'dynamic/?queryParam1', component: (props) => { const $state = props.transition.router.stateService; return ( <button onClick={() => { $state.go('dynamic', { queryParam1: num++ }, { location: 'replace'}); }} > only change queryParam1 </button> ); }}
in my code, the history.length still increased.
history.length
Correct me if I'm wrong. Thank you.
The text was updated successfully, but these errors were encountered:
I just found that this works as expected(replace history):
stateService.go(stateName, params, {source: 'url'})
I know 'stateService' is from '@uirouter/core'. Maybe I should go to create an issue there.
Sorry, something went wrong.
No branches or pull requests
Hi,
In my demo, I did this:
index.tsx:
router.config.ts:
When I call
in my code, the
history.length
still increased.Correct me if I'm wrong. Thank you.
The text was updated successfully, but these errors were encountered: