1

I have a feed that pulls in a list of objects, within this list there are various images:

enter image description here

In my code I will grab the original image like this:

<img src="{{MyObject.logo.original}}" >

However, if I try and grab any of the numeric names:

<img src="{{MyObject.logo.100X100}}" >

I get the following error:

EXCEPTION: Error: Uncaught (in promise): Template parse errors: Parser Error: Unexpected token '0.5' at column 19 in [{{MyObject.logo.50X50}}] in MyComponent@12:25 ("tArray" class="col-sm-6 col-md-4"> ]src="{{MyObject.logo.50X50}}" > "): MyComponent@12:25

HappyCoder
  • 5,985
  • 6
  • 42
  • 73

1 Answers1

4

The identifier starting with a digit is invalid. Use instead

{{MyObject.logo['50X50']}}
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567