File

core/list-group/list-item-checkbox.component.ts

Description

A component to display checkboxes in a c8y-li. Use it with content projection. It can be used standalone or with an ngModel.

Extends

CheckboxControlValueAccessor

Example

```html
 * <c8y-li>
 *   <c8y-li-checkbox></c8y-li-checkbox>
 * </c8y-li>
 * ```

Metadata

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

Index

Methods
Inputs
Outputs

Constructor

constructor(renderer: Renderer2, elementRef: ElementRef)
Parameters :
Name Type Optional
renderer Renderer2 No
elementRef ElementRef No

Inputs

disabled

Indicates if the checkbox is disabled.

Default value : false

selected

Indicates if the checkbox is selected.

Default value : false

Outputs

onSelect

An event emitted as soon as the checkbox is selected.

$event Type: EventEmitter

Methods

select
select(value)

Selects the checkbox.

Parameters :
Name Optional Description
value No

The value to pass.

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>

result-matching ""

    No results matching ""