Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

angular
detector
webdevelopment
communitycreator

What is ng-change in Angular?

Saad Akbar

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Angular is a web development framework used to handle the front-endthe screen visible to the user of web applications, and designed to make it easy to reuse code.

What is ng-change in Angular?

ng-change is an attribute used to detect the change in values of a particular HTML element.

Parameter

It takes a function or an action as a parameter and calls it when a value of a particular element changes.

ng-change is very useful, as it detects the change on the user’s side of the application.

Usage

It is used to decide what to do if a particular value is changed. For example, it could decide to do a spell check on a field if a particular word is typed.

Code

The following code calls the checkSpellings() function whenever the user types in that text field.

RELATED TAGS

angular
detector
webdevelopment
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring