Backbone.js Advent Calendarã®15æ¥ç®ã§ãã軽ãã«ããã¾ãã Backbone.Modelã®attributesã«ãªãã¸ã§ã¯ããè¨å®ããã¨ãã®æ³¨æç¹ãªã©ãattributesã¯setã¨ãã§è¨å®ãããå¤ããªãã¸ã§ã¯ããã¦æã£ã¦ãããã¤ã§ãã ã¾ã次ã®ããã«setã§attributesãè¨å®ãã¾ãã var MyModel = Backbone.Model.extend(); var m = new MyModel(); m.set('hoge', 'fuga'); m.set('foo', { bar: 'baz' }); ãã®ããã«hogeã«ã¯æååãfooã«ã¯ãªãã¸ã§ã¯ããè¨å®ãã¾ãããããã¦toJSONã§attributesãåå¾ãã¦å¤ãæ´æ°ãã¦ã¿ã¾ãã var attrs = m.toJSON(); attrs.hoge = 'new fuga'; attr
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}