Search code examples
backbone.jsbackbone-stickit

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.


Solution

  • 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"
    }