I am currently facing an issue with computed properties, I have a model named crossconnection containing some computed properties like :
relevantPoints: computed(function () {
if (this.get('IsCA') === true && this.get('IsCM') === true) {
return "/assets/images/big/ca-cm.png";
}
else if (this.get('IsCA') === true && this.get('IsCM') === false) {
return "/assets/images/big/ca.png";
}
else if (this.get('IsCA') === false && this.get('IsCM') === true) {
return "/assets/images/big/cm.png";
}
else if (this.get('IsCA') === false && this.get('IsCM') === false) {
return "/assets/images/big/nca-ncm.png";
}
}),
when running the project I keep getting the following error :
Uncaught TypeError: Cannot call a class as a function
Can somebody please clarify ?
PS : I am using,
- Ember : 3.0.0
- Ember Data : 3.0.2
- jQuery : 3.3.1
- Ember Bootstrap : 1.2.2
Aucun commentaire:
Enregistrer un commentaire