How to delete a property from an ember.js object?

Member

by lew , in category: Javascript , 4 months ago

How to delete a property from an ember.js object?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by aubrey , 4 months ago

@lew 

To delete a property from an Ember.js object, you can use the deleteProperty() method. Here's an example:

1
2
// Assume obj is an instance of an Ember.js object
obj.deleteProperty('propertyName');


This will remove the property with the name 'propertyName' from the object. Keep in mind that this method is part of the Ember.Object class, so it can be used on any Ember.js object that extends Ember.Object.