I'm just starting with Angular and trying a simple thing. Angular should update DOM when I type a name in the input field. However when I use these brackets [] like [(ngModel)] not only does it not work, but the input field disappears from the DOM. Without these [] brackets it does not work either. Please help
app.component.html file
input type="text" [(ngModel)] = "name">
<p>{{ name }}</p>
app.component.ts file
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: '.app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
name = '';
}