diff --git a/angular-ui-switch.js b/angular-ui-switch.js index 9a6b591..364e764 100644 --- a/angular-ui-switch.js +++ b/angular-ui-switch.js @@ -6,11 +6,13 @@ angular.module('uiSwitch', []) , replace: true , transclude: true , template: function(element, attrs) { + var ngClickExpr = (attrs.ngDisabled ? attrs.ngDisabled : (attrs.disabled ? true : false)) + '? true : (' + attrs.ngModel + '=!' + attrs.ngModel + (attrs.ngChange ? '; ' + attrs.ngChange + '()' : '') + ')'; + var html = ''; html += '