nbfontana / ngx-currency

Currency mask module for Angular 📦
https://nbfontana.github.io/ngx-currency
MIT License
237 stars 122 forks source link

Placeholder is not showing #154

Open TLKG opened 2 years ago

TLKG commented 2 years ago

Everything works great except placeholder text is not showing up. For example:

<input currencyMask formControlName="f1" placeholder="range: 0-10"/>

image

Only way to show placeholder is to manually erase the value from field

JanTrichter commented 7 months ago

In case anyone else encounters this here is the solution.

You have to set nullable to true for the input to show your placeholder initially, example:

<input placeholder="Your placeholder" type="text" currencyMask [options]="{ nullable: true }">