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"

demo

alternatively use of mask libraries input out there , create directive.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -