A module with just a directive to create a switch input component.
Directives
uiSwitch directive
The ui-switch
directive (not to be confused with ng-switch
) lets you create a toggle switch control bound to a boolean ngModel
value.
It requires ngModel
. It supports ngChange
and ngDisabled
.
<ui-switch ng-model="invoice.paid"></ui-switch>
<ui-switch ng-model="invoice.paid" disabled></ui-switch>
<ui-switch ng-model="invoice.paid" ng-disabled='{{...}}'></ui-switch>
Note that if $drag
service from mobile-angular-ui.gestures
is available ui-switch
will support drag too.
Param | Type | Description |
---|---|---|
ngModel | expression | The model bound to this component. |
[disabled] | boolean | Whether this component should be disabled. |
[ngChange] | expression | An expression to be evaluated when model changes. |
comments powered by Disqus