-2

In my angular component's template, I'm trying to achieve something like this:

<div> {{object1.some_property.(get value from object2.property and use it here, as it is a property of object1)}} </div>

Is it possible in JavaScript using some ES6 format or in typescript? If not, should I use some variable in the template to store the object's value and fetch it from there? If yes,then how?

2 Answers2

0
<div> {{object1.some_property.[get.value.from.your.other.object.and.put.it.in.square.brackets.like.this.as.thats.associative.arrays.notation.which.you.can.use.for.any.object.property]}} </div>
dee zg
  • 13,793
  • 10
  • 42
  • 82
0

have you tried something like {{object1.some_property[object2.property]}} ?

vanessa
  • 419
  • 1
  • 4
  • 13