-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access nested model attribute #2
Comments
@pheuter I think you can manage to walk that attribute in the bindings: {
'#title': {
modelAttr: 'model_data',
format: 'formatTitle'
}
},
formatTitle: function(val) {
return val.client.name;
} Does this work out for you? |
@delambo I just went with Backbone.Deep-Model, and so when stickit calls |
@pheuter Thanks for the update - glad to hear that stickit works well with deep-model. |
no the reverse does not work on nested model. I am using backbone-nested. And the set command is asymmetric with backbone. In backbone set is: this.model.set('attr',value). Whereas in backbone-nested or in backbone-deep-model set is : this.model.set({'attr':value}). So how do I overcome this... ? thanks for the great module anyway... |
Not sure I understand, @nilaysaha In backbone, What sort of problems are you seeing? |
Hi Ryan, Regards, On Friday, November 8, 2013, Ryan Leckey wrote:
|
Can I see the code for your bindings? Keep in mind |
here they are:
parseFloat(val.max_num_redemption)*parseFloat(val.value_per_redemption)}, so as you see the nested model attributes are compatible with model nested regards, On Fri, Nov 8, 2013 at 8:48 AM, Ryan Leckey notifications@gh.neting.ccwrote:
|
Hi @nilaysaha , Keep in mind |
It doesn't seem possible to bind a nested model attribute to a dom element.
For example:
The text was updated successfully, but these errors were encountered: