'Keep prefix even if dropSpecialCharacters is true with ngx-mask

<input matInput prefix="+55" mask=" (00) 00000-0000" [dropSpecialCharacters]="true" type="text" formControlName="phone" name="phone">

With this code I'm already getting a value masked as +55 (11) 12345-6789, and in the form a value like 11123456789, but I need to keep the prefix on value like +5511123456789. Is it possible?



Solution 1:[1]

Not sure if there's a way to do that but you can just re-add the prefix in your submit function.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tim Njagi