Function
set (obj, keyName, value) Object public
Module: | @ember/object |
---|
Defined in packages/ember-metal/lib/property_set.js:19
import { set } from '@ember/object';
- obj
- Object
- The object to modify.
- keyName
- String
- The property key to set
- value
- Object
- The value to set
- returns
- Object
- the passed value.
Sets the value of a property on an object, respecting computed properties and notifying observers and other listeners of the change. If the property is not defined but the object implements the setUnknownProperty
method then that will be invoked as well.
Ember.set(obj, "name", value);
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/2.18/functions/@ember%2Fobject/set