core/list-group/list-item-checkbox.component.ts
A component to display checkboxes in a c8y-li. Use it with content projection. It can be used standalone or with an ngModel.
```html
* <c8y-li>
* <c8y-li-checkbox></c8y-li-checkbox>
* </c8y-li>
* ```
host | { |
providers |
{
provide: NG_VALUE_ACCESSOR, multi: true, useExisting: forwardRef(() => ListItemCheckboxComponent)
}
|
selector | c8y-list-item-checkbox, c8y-li-checkbox |
templateUrl | ./list-item-checkbox.component.html |
Methods |
Inputs |
Outputs |
constructor(renderer: Renderer2, elementRef: ElementRef)
|
|||||||||
Parameters :
|
disabled
|
Indicates if the checkbox is disabled.
Default value : |
selected
|
Indicates if the checkbox is selected.
Default value : |
onSelect
|
An event emitted as soon as the checkbox is selected. $event Type: EventEmitter
|
select | ||||||
select(value)
|
||||||
Selects the checkbox.
Parameters :
Returns :
void
|
<label class="c8y-checkbox">
<input
type="checkbox"
class="form-control"
[disabled]="disabled"
[checked]="selected"
(change)="select($event.target.checked); (false)"
/>
<span></span>
</label>
<ng-content></ng-content>