Hi,
(using angular and typescript)
I have a toggle switch directive as:
return {
restrict: 'E',
scope: {
ngModel: '=',
onText: '@',
offText: '@',
title: '@',
},
template:
'<label class="switch-light well">' +
' <input type="checkbox" ng-model="ngModel">' +
' <span>' +
' {{title}}' +
' <span class="switch-light-option" ng-class="{ \'switch-light-checked\': !ngModel}">{{offText}}</span>' +
' <span class="switch-light-option" ng-class="{ \'switch-light-checked\': ngModel}">{{onText}}</span>' +
' </span>' +
' <a class="btn btn-primary"></a>' +
'</label>'
};
In my html I am using this as:
<toggle-switch ng-model="myValues" on-text="Enabled" off-text="Disabled" ></sts-toggle-switch>
Now I want to disable the above one. How can I do so.
I am pretty new to angular so any inputs would be appreciated.
Thanks