routerLink absolute url

前端 未结 7 1589
梦谈多话
梦谈多话 2020-12-30 20:54

From angular docs :

The router link directive always treats the provided input as a delta to the current url.

For instance, if the curre

7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-30 21:35

    HTML:

     {{ value }}
    

    TS:

    goToDetail(value) {
      this.router.navigate([this.urlDetalle + value]);
    }
    

    this.urlDetalle is the absolute path an I concat the value to view the detail of any entity

    It works fine!!

提交回复
热议问题