DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,673 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Kushal J
Kushal J

Posted on

Answer: Duplicate Identifier Issue with ngClass

It seems this line was the culprit in AOT.

[ngClass]="{'active': math.Name == subjectVM.SelectedMathDomain,'active': math.Title == subjectVM.SelectedDomain}"

And I changed it to

[ngClass]="{'active': (math.Name == subjectVM.SelectedMathDomain || math.Title == subjectVM.SelectedDomain)}"

I wonder why the first line does not throw an error in JIT.

Top comments (0)

🌚 Life is too short to browse without dark mode