xiris
xiris

Reputation: 351

Backbone Stickit with nested attributes

Is there a pretty way to bind and observe nested attributes (like state.city) with backbone.stickit ?

Thanks for you help.

Upvotes: 0

Views: 505

Answers (1)

MorKadosh
MorKadosh

Reputation: 6006

I've done that using Backbone.DeepModel (https://github.com/kahwee/backbone-deep-model). It worked just fine.

Once you've set the deep model, you can bind it's nested attributes with stickit this way:

bindings : {
"#city" : "state.city"
}

Upvotes: 1

Related Questions