I am working in an Angular project for an executive dashboard that follows the url convention /{model}/{modelId}. For a user story, I had to import a model from a file and redirect to the newly created model updating the current url. To update the url I wanted to use a Router with navigateByUrl method but it wasn't working. The import action is performed inside an existing model so the url update to redirect was just to change the {modelId}, and today I learnt that a url update in Angular propagates the update to the ActivatedRoute object and also updates the component tree, but, because I was redirecting to the same component, the tree component wasn't changed and thus navigateByUrl seemed to not be working.

In this case one of the solution is to subscribe to changes in the ActivatedRoute object and update the component on an url change, that could be the Angular way. Another solution is just to use the location property of the window object and force a complete reloading of the application.