I am trying to include a computed flag in my model when a particular string exists in an included array.
userType: DS.attr(), // ['Don','Ben','Dec', 'Con']
isDon: Ember.computed('userType', function() {
return (!((this.get('userType')).includes('Don'));
}).property('userType'),
any help ?
Aucun commentaire:
Enregistrer un commentaire