How can I conditionally disable the routerLink attribute?

后端 未结 6 2082
时光取名叫无心
时光取名叫无心 2020-11-27 05:56

In my Angular 2 application I\'m trying to disable a routerLink without any success. I\'ve tried to handle the click event on the click event (with event.

6条回答
  •  悲&欢浪女
    2020-11-27 06:27

    Disabling pointer-events on any html tag:

    Click me

    'none' resolves to disabling pointer-events, that is, disabling the link.

    null resolves to ignore the style.

提交回复
热议问题