At the moment, this behavior is the only one that is currently supported. However, there are discussions about making it configurable in the future. You can find more information about this in the following link: https://github.com/angular/angular/issues/9811
If you want to react to changes in parameters and perform initialization tasks, you can subscribe to the parameter changes and handle the initialization process in that callback function.
export class MyComponent {
constructor(private route : ActivatedRoute,
private r : Router) {}
reloadWithNewId(id:number) {
this.r.navigateByUrl('my/' + id + '/view');
}
ngOnInit() {
this.sub = this.route.params.subscribe(params => {
this.paramsChanged(params['id']);
});
}
paramsChanged(id) {
console.log(id);
// perform operations with id
}
}
For additional information, you can also check out this related post: How do I re-render a component manually?