-1
I was developing a simple project, and I needed to use masks in a certain form. I opted, at that time, for the use of JQuery
with the library Jquery Mask Plugin.
$(document).ready(function(){
$('.dinheiro').mask('000.000.000,00', {reverse: true});
});
But Jquery is conflicting with Angular when manipulating DOM, so I had to remove Jquery from dependencies.
How can I implement a mask with pure Javascript?
In addition to the native implementation, an alternative would be the ngx-Mask
– renanvm
Here: https://answall.com/questions/241620/formatar-valor-em-dinheiro-enquanto-digita-com-javascript-puro
– LeAndrade
@renanzin worked, but I still want to know what happens "underneath the scenes" in a mask
– Arthur Siqueira
Obs: This Mask is very bad, besides that it doesn’t work very well for mobile...
– Ivan Ferrer
to avoid conflicts, use:
jQuery.noConflict();
– Ivan Ferrer