Problem

问题

You want to set multiple properties on an object with a single method call.

希望通过一次方法调用设置对象的多个属性值。

Solution

解决方案

Use the setProperties method of Ember.Object.

使用Ember.ObjectsetProperties方法:

  1. person.setProperties({
  2. name: 'Gavin',
  3. age: 36
  4. })

Example

示例

JS Bin