assisrafael/angular-input-masks

Dynamic masks

Open

#235 opened on Nov 17, 2016

View on GitHub
 (0 comments) (3 reactions) (0 assignees)JavaScript (970 stars) (334 forks)batch import
enhancementhelp wanted

Description

Hi,

Given a condition on my controller, I need to change the input masks (ui-money-mask to ui-number-mask) dynamically.

I am doing this way:

<input ng-if="condition" type="text" ui-money-mask />
<input ng-if="!condition" type="text" ui-number-mask />

Is there a better way to do it?

Thanks.

Contributor guide