2017-04-11 1 views

답변

-1

ng-disable을 사용하여 angular-bootstrap-toggle에서 토글 클래스를 비활성화하려면 issue을 확인할 수 있습니다.

다른 방법으로는 이것을 해킹 할 수있는 방법이 있습니다. ng-class = "{disabled : your_condition_here}"를 (를) 귀하의 Google에 추가하십시오. 아래의 코드처럼

<toggle ng-model="toggleValue" ng-change="changed()" ng-class="{disabled : true}"></toggle> 

및 CSS 파일에 아래 추가

toggle.disabled { 
    cursor: not-allowed; 
    pointer-events: none; 
    box-shadow: none; 
    opacity: 0.65; 
} 
관련 문제