Passive Link in Angular 2 - equivalent

后端 未结 16 2796
谎友^
谎友^ 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:27

    A really simple solution is not to use an A tag - use a span instead:

    Click here
    
    span.link {
      color: blue;
      cursor: pointer;
      text-decoration: underline;
    }
    

提交回复
热议问题