thelebdev / ng2-currency-mask

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

Option to show zero with nulls #10

Open guillep2k opened 5 years ago

guillep2k commented 5 years ago

There's an issue in the original project about this problem, and there are instructions to deal with it. They could be implemented in this fork.

Migrated from original project (https://github.com/cesarrew/ng2-currency-mask/issues/116)

Orignal request by @tavuntu

So, the testing team registered an issue "the user is able to remove the mask from the input", and I thought maybe we should have option to show zeros when ngModel is null/undefined/empty, right now the user can completely erase the mask, and that may not be wanted.

Response by @pripatel93

I have posted a workaround for this issue which applies the mask when no input is present Check the issue I posted here You can see my fork which has a fixed commit to guide you here.