The (ngModelChange)
event does not fire when I clear all values from input field by using Ctrl.A
or paste a value into it.
<input pInputText (ngModelChange)="IsElementDataMissingForMultiValue(languages.TranslationValue)"
[(ngModel)]="languages.TranslationValue" type="text" />
function Controller()
{
function IsElementDataMissingForMultiValue(value)
{
alert(value)
}
}
The (ngModelChange)
event triggers when I remove values one by one or add values one by one. But it does not trigger when removing all values by using Ctrl+A
or pasting values by using Ctrl+V
.
It's my mistake.
The problem occurred when I does not assign
$event
tongModel
object in some event'sThis below code does not working
But the below code working like a charm!.
I hope this may be helps others.