This repository has been archived by the owner on May 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,36 @@ | ||
There are two directives that can make a group of buttons behave like a set of checkboxes, radio buttons, or a hybrid where radio buttons can be unchecked. | ||
With the buttons directive, we can make a group of buttons behave like a set of checkboxes (`uib-btn-checkbox`) or behave like a set of radio buttons (`uib-btn-radio`). | ||
|
||
In order to be able to uncheck the currently selected radio button, one can use the `uncheckable` attribute in tandem with `uib-btn-radio`. | ||
### uib-btn-checkbox settings | ||
|
||
* `ng-model` - | ||
Model where we set the checkbox status. By default `true` or `false`. | ||
|
||
* `btn-checkbox-true` | ||
_(Default: `true`)_ - | ||
Sets the value for the checked status. | ||
|
||
* `btn-checkbox-false` | ||
_(Default: `false`)_ - | ||
Sets the value for the unchecked status. | ||
|
||
### uib-btn-radio settings | ||
|
||
* `uib-btn-radio` - | ||
Value to assign to the `ng-model` if we check this radio button. | ||
|
||
* `ng-model` - | ||
Model where we set the radio status. All radio buttons in a group should use the same `ng-model`. | ||
|
||
* `uncheckable` | ||
_(Boolean attribute)_ - | ||
Whether a radio button can be unchecked or not. | ||
|
||
### Default settings `uibButtonConfig` | ||
|
||
* `activeClass` | ||
_(Default: `active`)_ - | ||
Class to apply to the checked buttons. | ||
|
||
* `toggleEvent` | ||
_(Default: `click`)_ - | ||
Event used to toggle the buttons. |