Why does angular's ng-disabled works with bootstrap's btn class?

后端 未结 2 1985
面向向阳花
面向向阳花 2020-12-31 11:25

I have an anchor tag on which, ng-disabled directive doesn\'t work at all.
It works on buttons but as soon as I add the Bootstrap\'s btn class to the anchor tag, Angular

2条回答
  •  星月不相逢
    2020-12-31 11:59

    Here is what I did. It's bit of a hack but works

    in css

    a[data-disabled=true] {
      cursor: not-allowed;
      pointer-events: none;
      opacity: .65;
      filter: alpha(opacity=65);
      -webkit-box-shadow: none;
      box-shadow: none;
    }
    

    in html

    Test
    

提交回复
热议问题