Angular (ngModelChange) vs (change)

By Arvind Rai, December 30, 2023
1. The ngModelChange is an @Output property of Angular NgModel Directive whereas change event is HTML DOM event that triggers when the value of element is modified.
2. NgModel performs two-way binding as [(ngModel)]. If we want two use separately, use ngModel in property binding and ngModelChange in event binding.
3. For value change in <input>, <select> and <textarea> element, ngModelChange event triggers only with ngModel whereas change event always triggers.
4. In ngModelChange the $event directly gives the value of HTML element whereas in change event the $event gives value of input element by using $ .

(ngModelChange) Event

1. NgModel Directive plays the role of two-way binding in HTML elements. NgModel uses names as ngModel in property binding and ngModelChange in event binding.
2. ngModelChange event triggers when the value of the view model changes.
3. The two-way binding [(ngModel)] is the combination of property binding [ngModel] and event binding (ngModelChange) .
Look into the code.
HTML code:
<input [ngModel]="price" (ngModelChange)="onPriceChange($event)"> 
TS code:
price = "100";
onPriceChange(priceVal:string) {
    this.price = priceVal;
When the user changes the value into input text, ngModelChange event will trigger and onPriceChange() method will be called.
The above code is equivalent to [(ngModel)] two-way binding as below.
<input [(ngModel)]="price" > 
Change in value of input text will reflect in the value of price. We can verify its value using {{price}} in HTML template.
4. In case we use ngModel as an attribute and not as property binding, ngModelChange event will still trigger.
<input ngModel (ngModelChange)="onPriceChange($event)"> 
In the above code onPriceChange() will be called for value change.
5. If ngModel is not used, ngModelChange event will not trigger.
<input (ngModelChange)="onPriceChange($event)"> 
In the above code onPriceChange() will not be called for value change.

(change) Event

1. change is the HTML DOM event that triggers when we modify values in <input>, <select> and <textarea> elements.
2. change event is used as following.
HTML code:
<input (change)="onDataChange($event)"> 
TS code:
onDataChange(eventVal: any) {
3. In (change)="onDataChange($event)", value is obtained using $ whereas in (ngModelChange)="onDataChange($event), the object $event directly gives the value.
4. ngModelChange and change event both can be used together. In input text, ngModelChange event triggers just after value change whereas change event triggers on value change + on focus out.
HTML code:
<input [ngModel]="price"
TS code:
price = "110";
onPriceChange1(priceVal:string) {
	this.price = priceVal;
	console.log("ngModelChange: ", this.price);
onPriceChange2(e: any) {
	console.log("change: ",;

Complete Example

	<input [ngModel]="empName" (ngModelChange)="onNameChange($event)">
	<input (change)="onAgeChange($event)">
	<select [ngModel]="profile" (ngModelChange)="onProfileChange($event)">
		<option value="manager">Manager</option>
		<option value="developer">Developer</option>
		<option value="director">Director</option>
	<input type="radio" value="male" name="empGender" (change)="onEmpGenderChange($event)"> Male
	<input type="radio" value="female" name="empGender" (change)="onEmpGenderChange($event)"> Female
<div>About Employee:
	<textarea [(ngModel)]="aboutEmp"></textarea>
	<br />{{aboutEmp}}
import { Component } from "@angular/core";
import { FormsModule } from "@angular/forms";

	selector: 'app-emp',
	standalone: true,
	imports: [FormsModule],
	templateUrl: './employee.component.html'
export class EmployeeComponent {
	aboutEmp = "Write about employee";
	empName = "Ram";
	onNameChange(name: string) {
		this.empName = name;
	onAgeChange(ageEvent: any) {
	profile = "developer";
	onProfileChange(profile: string) {
		this.profile = profile;
	onEmpGenderChange(genEvent: any) {
Find the print-screen of the output.
Angular (ngModelChange) vs (change)



©2024 | Privacy Policy | Contact Us