html5 - angular2 click event from the current page, route to the current page, the page does not refresh
为情所困
为情所困 2017-05-24 11:36:07
0
1
1124

Click another user in a user's homepage to jump to the user's homepage, that is, route from the current page to the same routing page, but the passed user ID is different, but the page does not refresh

The data is also refreshed, but the overall page remains unchanged and is not refreshed

There is no problem with routing configuration

为情所困
为情所困

reply all(1)
洪涛

My personal understanding is that when angular2 routes to this page, the routing path has not changed, so the page is not reloaded, but the parameters passed by the route have changed. According to logic, angular2 only changes the model data;
There are two solutions Method;
1. Clear all variables when getting routing parameters on this page to achieve page jump

2. Set different routing paths to point to the same routing module

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!