I am calling router.navigate on same page with some query string parameters. In this case, ngOnInit() does not call. Is it by default or do I need
router.navigate
ngOnInit()
I have used the following and it worked.
onButtonClick() { this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; } this.router.onSameUrlNavigation = 'reload'; this.router.navigate('/myroute', { queryParams: { index: 1 } }); }