rivets-backbone-adapter icon indicating copy to clipboard operation
rivets-backbone-adapter copied to clipboard

Can't retreive collection model by id

Open Jmeyering opened this issue 9 years ago • 0 comments

Using this adapter Its impossible to retreive a collection model by id. For example.

I may have a model in my view that contains a Collection of products. and I want to fetch a particular one in my view.

I would expect

<li rv-text="model:products:34:name"></li>

to be the same code as

view.model.get("products").get("34").get("name");

Which returns the proper value.

Is there any where to mimic this behavior? I noticed that you're specifically returning an array when a collection is requested, so I'm not sure currently if there is.

Jmeyering avatar May 27 '15 01:05 Jmeyering