import Component from '@ember/component';
export default Component.extend({
hello: true ,
actions:{
switch: function(hello){
if(hello = false){
this.set('hello', true);
}else {
if(hello = true){
this.set('hello', false);
}
}
I'm trying to toggle between the false and true options however this always returns false. I need it so that it switches between the two depending on the its current value.
}
}
});
Aucun commentaire:
Enregistrer un commentaire