(change) vs (ngModelChange) in Angular: what's the difference and when to use which
Hello everyone! I'm new to Angular and TypeScript, trying to understand forms. I have a simple input with two-way binding via [(ngModel)], and I need to catch the moment when the user changes the value.
I see two similar events in the documentation: (change) and (ngModelChange). At first glance they do the same thing, but I feel that's not the case.
Here's an example of my code:
```typescript
// component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-test',
template: `
Current value: {{ name }}
` }) export class TestComponent { name: string = ''; onChange(event: any) { console.lNo answers yet.
Log in to leave an answer