I have a route with a parameter when going to the / users / 123 page, where 123 is the parameter called by ngOnInit, I get my parameter, and I call my method to get the user.
However, when I am on this page and I click on the second link / users / 456, then ngOnInit is no longer called (since this page has already been created). Therefore, without ngOnInit, I cannot get the route parameter and I cannot call my method to get the user.
If I go to / users / 123, then in / home, then in / users / 456, it works explicitly.
What do I need to use to make sure that the function that receives this parameter and receives the user is ALWAYS called, even if I'm already on the same page?
source share