cmyd-input-comma
v0.0.1
Published
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
Downloads
4
Maintainers
Readme
CmydInputComma
This library was generated with Angular CLI version 12.2.0.
Overview
CmydInputComma
Docs
valueChange
Emits a number value.value
Used for providng value.
This is how you will use with a number variable
<input
type="text"
cmydComma
(valueChange)="SomeNumberVariable" />
CmydInputComma
Since we can't use formControl with directive attached, we do it like this.
This is how you will use with a formControl
<input
type="text"
cmydComma
(valueChange)="form.get('control')?.setValue($event)" />
<input
formControlName="control"
hidden
type="number" />
Or you can use it like this
<input
type="text"
cmydComma
[disabled]="form.get('control')?.disabled"
[value]="form.get('control')?.value"
(valueChange)="form.get('control')?.setValue($event)" />
<input
formControlName="control"
hidden
type="number" />
Version
0.0.1
Initial commit
That's it,
Further help
If you found a bug or know a better way of doing it please do reach me out at [email protected]
.