Passive Link in Angular 2 - equivalent

后端 未结 16 2750
谎友^
谎友^ 2020-12-04 13:36

In Angular 1.x I can do the following to create a link which does basically nothing:

My Link

But the same tag

16条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 14:22

    An achor should navigate to something, so I guess the behaviour is correct when it routes. If you need it to toggle something on the page it's more like a button? I use bootstrap so I can use this:

    
    

提交回复
热议问题