projects/k-components/src/lib/components/numericupdown/numericupdown.component.ts
selector | wm-numeric-up-down |
templateUrl | ./numericupdown.component.html |
Properties |
Methods |
Inputs |
Outputs |
model | |
Type : NumericUpDownModel
|
|
value | |
Type : number
|
|
valueChange | |
Type : EventEmitter<number>
|
|
valueChanged | |
Type : EventEmitter<any>
|
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
onChange | ||||
onChange($event)
|
||||
Parameters :
Returns :
void
|
innerValue |
Type : number
|
Default value : 0
|
model |
Type : NumericUpDownModel
|
Decorators :
@Input()
|
value |
Type : number
|
Decorators :
@Input()
|
valueChange |
Type : EventEmitter<number>
|
Default value : new EventEmitter()
|
Decorators :
@Output()
|
valueChanged |
Type : EventEmitter<any>
|
Default value : new EventEmitter()
|
Decorators :
@Output()
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { NumericUpDownModel } from '@mobilize/wms-framework';
@Component({
selector: 'wm-numeric-up-down',
templateUrl: './numericupdown.component.html',
})
export class NumericUpDown {
innerValue = 0;
@Input()
model: NumericUpDownModel;
@Input()
value: number;
@Output()
valueChange: EventEmitter<number> = new EventEmitter();
@Output()
valueChanged: EventEmitter<any> = new EventEmitter();
onChange($event): void {
this.valueChange.emit($event);
this.model.Value = $event;
this.valueChanged.emit($event);
}
ngOnInit(): void {
this.model = this.model ?? new NumericUpDownModel();
}
}
<kendo-numerictextbox [(ngModel)]="innerValue" (valueChange)="onChange($event)">
</kendo-numerictextbox>