In Ember.js, how can I create a copy of an array I get from Ember.computed.oneWay("arrayName")
?
I tried:
export default Ember.Component.extend({
original : Ember.computed.oneWay("item.things"),
newCopy: Ember.copy(this.get("original"), true)
})
I want newCopy to be the array of original so when I modify it, the item.things array will not be altered.
Aucun commentaire:
Enregistrer un commentaire