jeudi 5 avril 2018

Create a alias property for a property inside an array

Consider the following array,

auth: [{
    username: "",
    password: "",
  },
  {
    username: "",
    password: "",
  }
]

I am not able to add alias to a property inside the array like the one described below

defaultUsername: Ember.computed.alias('deviceDetails.auth[0].username'),
username: Ember.computed.alias('deviceDetails.auth[1].username')

How to achieve this?




Aucun commentaire:

Enregistrer un commentaire