projects/k-components/src/lib/components/togglebutton/togglebutton.component.ts
changeDetection | ChangeDetectionStrategy.OnPush |
selector | wm-toggle-button |
templateUrl | ./togglebutton.component.html |
Properties |
Methods |
Inputs |
Outputs |
itemCheck | |
Type : boolean
|
|
model | |
Type : ToggleButtonModel
|
|
click | |
Type : EventEmitter<any>
|
|
itemCheckChange | |
Type : EventEmitter<any>
|
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
click |
Type : EventEmitter<any>
|
Default value : new EventEmitter()
|
Decorators :
@Output()
|
itemCheck |
Type : boolean
|
Decorators :
@Input()
|
itemCheckChange |
Type : EventEmitter<any>
|
Default value : new EventEmitter()
|
Decorators :
@Output()
|
model |
Type : ToggleButtonModel
|
Decorators :
@Input()
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { AngularComponentId } from '@mobilize/wms-framework';
import { ComponentId } from '@mobilize/wms-framework';
import { ToggleButtonModel } from '@mobilize/wms-framework';
@Component({
selector: 'wm-toggle-button',
templateUrl: './togglebutton.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
@ComponentId([AngularComponentId.toggleButton])
export class ToggleButton {
@Input()
model: ToggleButtonModel;
@Output()
click: EventEmitter<any> = new EventEmitter();
@Input()
itemCheck: boolean;
@Output()
itemCheckChange: EventEmitter<any> = new EventEmitter();
ngOnInit(): void {
this.model = this.model ?? new ToggleButtonModel();
}
}
<button>
<ng-content></ng-content>
</button>