Angular2, what is the correct way to disable an anchor element?

前端 未结 10 1270
死守一世寂寞
死守一世寂寞 2020-11-27 17:51

I\'m working on an Angular2 application, and I need to display -- but disable an HTML element. What is the corr

10条回答
  •  情话喂你
    2020-11-27 18:31

       .disabled{ pointer-events: none }
    

    will disable the click event, but not the tab event. To disable the tab event, you can set the tabindex to -1 if the disable flag is true.

  • Menu Item
提交回复
热议问题