I've got a ref
of an object inside a repeat.for
which looks like this
<tr repeat.for="machine of machines">
<div with.bind="machine" ref="pb">...</div>
</tr>
Aurelia Inspector shows the ref under the machine object:
I tried to access it in attached()
like this:
attached() {
console.log(this.machines[0].pb)
}
but of course this will return an error since pb
does not exist on the object.
Usually when I try to access ref-bound elements in my Typescript code, I know I need to initialize them first. But how can I do that now since it's inside of another object?