using the ng change in angular 2 using ng model variable
<p>How can I use the ng-change event in angular 2? Whenever the ng-model variable is changed, a function has to be called. </p>

<pre><code>[(ngModel)]="variable"
ngchange=variable;
</code></pre>