One issue I am facing involves an array with properties:
export interface IGameTag{
name: string;
relativePath: string;
filename: string;
}
I understand that it is possible to include the filename
in the relativePath
like this:
<div *ngFor="let gameTag of gameTags">
<img [src]="gameTag.relativePath">
</div>
However, my requirement is to combine the filename
with the relativePath
. When I try to do this, it results in a compiler error in html:
<div *ngFor="let gameTag of gameTags">
<img [src]="gameTag.relativePath + '\\'+ gameTag.filename">
</div>
The error message reads:
main.e7b5b0b437c5d1b16f1f.js:185910 Error: Errors during JIT compilation of template for GameCardComponent: Parser Error: Unexpected token '{' at column 2 in [${gameTag.relativePath}\${gameTag.filename}]
As requested, here is a sample value for relativePath
:
relativePath = assets\image
fileName = 123456789.png