supermedium/superframe

[state] `bind-for`/`bind-item` example doesn't work; `for` value is undefined

Opened this issue ยท 4 comments

When trying to use bind-for with bind-item, errors are thrown, even for the basic example provided in the docs.

TypeError: state.shoppingItem is undefined

I've tried changing the for value to item, changed shoppingItem.name to just name, among numerous other things.

It appears that only the interpolation method works, and without using the reference to the item object, i.e., {{name}}

Here is a fiddle illustrating what works and what doesn't: https://jsfiddle.net/um18bp3z/3/

Am I just missing something?

Thanks.

This is happening in version 6.8.0, but haven't checked against all other versions yet.

still not working on v6.8.0 and aframe 1.0.4

For me it is working, when I change the for value to item.

A-Frame: 0.9.2
frame-state-component: 6.8.0

@dsinni Updated your fiddle accordingly: https://jsfiddle.net/oyzwent8/

Thanks @marlon360 that fiddle helped me get my code working, I couldn't seem to get the simplest of tests to work. It seems the templating engine is really fussy and spews a LOT of hard to comprehend errors. Could do with some more explanation in the docs, including clearer examples.