Reputation: 31
I am getting this build error - NG 5002 Parser error : unexpected token "=" at column 2 in the below component.html file line
<button id="asd" [disabled]="sendMail.Invalid" type="button" (click)="hideexampleMail()">
Another place i am also getting the same error, ie
<div *ngIf="showExmapleMail"></div>
I was migrating my angular 8 application to Angular 12.
Any idea?
Upvotes: 3
Views: 20211
Reputation: 40677
Since the template validation is more strict with Angular 12, the problem might be caused by an undefined value. You might want to try:
<button id="asd" [disabled]="sendMail?.Invalid" type="button" (click)="hideexampleMail()">
Upvotes: 4