I am trying to run an eval in my angular template like so:
<div *ngFor="...">
<div *ngIf="eval('...')"></div>
</div>
You get the idea.
But I get the following error:
error TS2339: Property 'eval' does not exist on type 'CreateComponent'.
Obviously angular thinks that eval is a property of the component.
How do I fix this?
Don't tell me eval is evil. I know that and my use case is absolutely safe.
I can't just move the logic from the expression into a function on the controller.
eval("variableName" + i)in the loop