Angular 2/4/5+ 重复点击菜单刷新界面

记一下,网上没找到方法 自己搞了好久  通过跳转到别的界面在跳回来的方式进行实现
 
记住一定要加setInterval才会更新界面
 
 
//再次点击刷新界面
if(this.router.url==item.url){
this.router.navigateByUrl('/app/home');
 
setInterval(()=>{
this.router.navigateByUrl(item.url);
},1)

猜你喜欢

转载自www.cnblogs.com/super-cj/p/9162029.html