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
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
In my application I am using one component for different URLs. Nevertheless, I want to force Angular to create new component on route change like this:
public $routerCanReuse(): boolean { return false; }
This is working fine. However, in one place in the component code, I need to put some parameters to the URL without reloading the page or navigating to a different one. I have tried to do the following:
This results in updated parameters in the URL (which is desired and expected), but also reloads the page (which is causing the create a new instance of the component, which is not desired). That raises my question - does Component Router provide an API for just updating the URL parameters, without actually invoking the routing? I did not find anything in the documentation. Thank you very much in advance.
The text was updated successfully, but these errors were encountered:
In my application I am using one component for different URLs. Nevertheless, I want to force Angular to create new component on route change like this:
public $routerCanReuse(): boolean { return false; }
This is working fine. However, in one place in the component code, I need to put some parameters to the URL without reloading the page or navigating to a different one. I have tried to do the following:
this.$rootRouter.navigate(['/Component', this.parameters]);
This results in updated parameters in the URL (which is desired and expected), but also reloads the page (which is causing the create a new instance of the component, which is not desired). That raises my question - does Component Router provide an API for just updating the URL parameters, without actually invoking the routing? I did not find anything in the documentation. Thank you very much in advance.
The text was updated successfully, but these errors were encountered: