I have this case in which I want to check against a string that contains curly braces. Data retrieved from object contains a string with curly braces.
let defaultTitleFromComponentVar = 'Hello There';
let dataList = ['Test1', 'Title2', '{{defaultTitle}}', 'Title3'];
<ul>
<li *ngFor="let title of dataList">
<ng-container *ngIf="title == '{{defaultTitle}}'">
{{ defaultTitleFromComponentVar }}
</ng-container>
<ng-container *ngIf="title != '{{defaultTitle}}'">
{{ title }}
</ng-container>
</li>
</ul>
Error get in console:
Uncaught Error: Template parse errors: Can't bind to '*ngIf' since it
isn't a known property of...