cesarrew / ng2-currency-mask

A very simple currency mask directive that allows using a number attribute with the ngModel.
MIT License
235 stars 116 forks source link

Is there a way to use decimals with the percent formatter? #84

Closed pscanlon1 closed 6 years ago

pscanlon1 commented 6 years ago

How would you suggest to use this for percent formatting...

ie.. user types in 10 you show 10%

model value is .1

Thanks!

cesarrew commented 6 years ago

Hi. This is not the goal of this component. Maybe you can find this behaviour in a component in PrimeNG.

cesarrew commented 6 years ago

Sorry for my mistake. You already can do this using as follow:

<input currencyMask [(ngModel)]="value" [options]="{ prefix: '', suffix: '%', precision: '0' }" />