Tutorial Angular 4 Reload Init On Parameter Change In The Same Route

Angular Tutorial 4 trick how to reload init value when parameter change occurs on the same route. This time I experienced problems with angular 4 when changing parameters on the same route, init data did not change. This problem happens because the Angular does not refresh the page on the same route.

The solution is quite easy, recall the init function when we capture the parameters thrown by the route with the following script.

The above script I got directly from the site https://stackoverflow.com/a/42835928, thanks to gpanagopoulos who have shared.

I created this article in addition to sharing how to complete the reload component on the same router as a reminder for my angular project later on.

Read another article: How to Create Autofocus Directive Certain Elements Angular 4

So this brief article may be useful

The following two tabs change content below.
This site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.

Leave a Comment

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.