manish jadli
manish jadli

Reputation: 29

error NG5002: Parser Error: Unexpected token ===

we are stuck in a problem in angular. if we run the angular 16 project with micro-frontend then we see this error

error NG5002: Parser Error: Unexpected token ===

enter image description here

Upvotes: 0

Views: 1364

Answers (2)

amir balazade
amir balazade

Reputation: 1

What is optionalFieldValue type is your ts file: how did you define this variable and how does it get data? these problems usually occurs when the types are not accurately provided.

Upvotes: 0

dinesh
dinesh

Reputation: 181

Change the condition *ngIf="optionalFieldValue==='password'" To *ngIf="optionalFieldValue=='password'"

When you try to use the === operator in a template, which is not allowed in Angular templates, comparison operator to use in Angular templates is== or !=.

https://angular.io/guide/template-typecheck

Upvotes: 0

Related Questions