Reputation: 199
I'm using Angular 2 and I would like to write something like this
*ngIf="game.Championship == 'Coupe d'Alsace'"
However I get an error because of the single quote between d and A. Is is possible to somehow escape this character?
Upvotes: 11
Views: 13098
Reputation: 657761
Usually a \\
*ngIf="game.Championship == 'Coupe d\'Alsace'"
or
*ngIf="game.Championship == 'Coupe d\\'Alsace'"
depending on where you put it.
Upvotes: 15