A basic checkbox input
<rl-checkbox ng-model="" on-toggle="" ng-disabled="" active=""> ... </rl-checkbox>
Two-way binds the specified value to the checkbox 'checked' property. See ng-model.
This expression is triggered when the checkbox is clicked. The new value
of the checked property is provided on the expression scope as value
.
This option will set disabled
on the checkbox if the expression inside it is truthy.
If set to false, clicking on the checkbox won't trigger the state to change. This is used primarily if the checkbox is within a larger context that can be clicked to toggle to avoid toggle/untoggle behavior.
A checkbox with an ng-model, on-toggle, and disabling.
<rl-checkbox ng-model="button.checked" on-toggle="button.click()" ng-disabled="true"> ... </rl-checkbox>
Output (When checkbox.checked is true):
<span class="rl-checkbox-checked" ng-click="checkbox.toggle()" disabled> ... </span>
Output (When checkbox.checked is false):
<span class="rl-checkbox" ng-click="checkbox.toggle()" disabled> ... </span>
(By default, rl-checkbox is styled as fa-square-o
and rl-checkbox-checked is styled as fa-check-square-o