angular - Apply pipe to input box -
i have written thousandsseparatorpipe
, working fine label
shown below.
<ion-label fixed>{{project.contingency | thousandsseparatorpipe}}</ion-label>
but how can apply pipe
ion-input
? because need show thousands separator when user types on below numeric
box.any help, please?
<ion-input type="number" formcontrolname="budget" [(ngmodel)]="project.budget" ></ion-input>
no, it's not possible use pipes on inputs above, in angularjs not recommended way too.
inorder use need apply two-way data binding 2 instructions. [ngmodel]="project.budget| thousandsseparatorpipe" (ngmodelchange)="project.budget= $event"
alternatively use of mask
libraries input out there , create directive.
Comments
Post a Comment