I am working with a simple input that has an ngModel attached to it. However, I am unable to see in real-time the content of that ngModel and an error message stating
Cannot read property 'content' of undefined
keeps popping up.
<input ([ngModel])="page.content" />
{{ page.content }}
export interface Page {
uid: string;
content: string;
}
@Input() page: Page;
ngOnInit() {
console.log(this.page.content)
}
I attempted to get a real-time console.log
of what I type as I type in the
<input ([ngModel])="page.content" />
You can find a reference on this issue at this stackblitz link