{"comment":{"created_at":"2011-10-24T12:44:09Z","body":"+1 for the idea. \r\n\r\nThere are a lot of variations for handling nested models in backbone:\r\n\r\n* as an attribute, like you've shown\r\n* as a model property: `model.user = someOtherModel` (my preferred way of doing this)\r\n* using backbone-relational\r\n\r\nOf these three options (among others, probably), handling the attribute like you've shown is probably the easiest. We'll have to support all three of these nested model setups, to do this properly, though. That will make it a bit of a challenge. But, I think it's worth doing as there have been multiple requests for this.","updated_at":"2011-10-24T12:44:09Z","url":"https://api.github.com/repos/derickbailey/backbone.modelbinding/issues/comments/2502917","id":2502917,"user":{"avatar_url":"https://secure.gravatar.com/avatar/e592bd1326b1e80188ed4c0bf26b9f75?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"e592bd1326b1e80188ed4c0bf26b9f75","url":"https://api.github.com/users/derickbailey","id":75190,"login":"derickbailey"}},"action":"created","issue":{"number":24,"created_at":"2011-10-02T22:34:47Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Would be cool if there is a possibility to bind nested models, like:\r\n\r\n```javascript\r\n    var model = new Backbone.Model();\r\n    var model.set({\r\n        user: yetAnotherBackboneModel,\r\n        foo: 'bar'\r\n    });\r\n\r\n    Backbone.ModelBinding.bind(view)\r\n```\r\n\r\nand then a data-binding in the html template\r\n\r\n```html\r\n  <p data-bind=\"html user.name\"></p>\r\n```\r\n\r\nWhat do you think? :)","comments":1,"title":"Binding in a nested model","updated_at":"2011-10-24T12:44:09Z","url":"https://api.github.com/repos/derickbailey/backbone.modelbinding/issues/24","id":1798650,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/5ee5cd89f7ed6895e80400156211fdbb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5ee5cd89f7ed6895e80400156211fdbb","url":"https://api.github.com/users/akoenig","id":224910,"login":"akoenig"},"html_url":"https://github.com/derickbailey/backbone.modelbinding/issues/24","labels":[],"state":"open"},"legacy":{"issue_id":1798650,"comment_id":2502917}}