英文原文:http://emberjs.com/guides/cookbook/working_with_objects/setting_multiple_properties_at_once
问题
希望通过一次方法调用设置对象的多个属性值。
解决方案
使用Ember.Object的setProperties方法:
person.setProperties({name: 'Gavin',age: 36})
英文原文:http://emberjs.com/guides/cookbook/working_with_objects/setting_multiple_properties_at_once
希望通过一次方法调用设置对象的多个属性值。
使用Ember.Object的setProperties方法:
person.setProperties({name: 'Gavin',age: 36})
让时间为你证明