Angular 2/4/5+ 重復點擊菜單刷新界面


記一下,網上沒找到方法 自己搞了好久  通過跳轉到別的界面在跳回來的方式進行實現
 
 
 
      //再次點擊刷新界面
      if (this.router.url == item.url) {
        this.router.navigateByUrl("/app/home").then(() => {
          this.router.navigate([item.url]);
        });
      } else {
        this.router.navigate([item.url]);
      }


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM