I have some problem with ng2 and inputmask. For example I have had this code component.html
<div class="form-group col-sm-7">
<label class="control-label" for="sender-phone">Phone *</label>
<input type="text" [(ngModel)]="sender.phone" class="form-control" id="sender-phone" placeholder="Phone">
</div>
component.ts
ngAfterViewInit() {
let phoneNumberInput = document.getElementById('sender-phone');
let inputmask = new Inputmask('+7(999)999-99-99');
inputmask.mask(element);
}
Inputmask is working good. But my [(ngModel)]
didn't work. Anyone know how I can resolve my issue ?
My code for example http://plnkr.co/edit/F3pob7hH2ZrJv0MDNa9x?p=preview