I'm running the Angular tutorial. I'm stuck.
I did a search on here, I found a similar error , but it doesn't help me.
The error I'm getting:
Error: Uncaught (in promise): Error: Template parse errors:
Parser Error: The '?.' operator cannot be used in the assignment at column 20 in [selectedHero?.name=$event] in ng:///AppModule/AppComponent.html@15:19 ("
<div>
<label>name: </label>
<input [ERROR ->][(ngModel)]="selectedHero?.name" placeholder="name"/>
</div>
</div>
"): ng:///AppModule/AppComponent.html@15:19
I tried with and without the ?. Doesn't make difference. I tried the line:
<input [ngModel]="selectedHero?.name" (ngModelChange)="selectedHero.name = $event" />
I went back to the page and copied the entire code, it doesn't change anything.
I got the same error on the very first part of the tutorial too.