import Ember from 'ember';
export default Ember.Controller.extend({
cbState: false,
actions: {
myChangeAction() {
const state = this.get('cbState'); // cbState is not updated when use 'change' event
...
}
}
});
myChangeAction is executed, no problem. But cbState does not change now… If i use a click event like this:
It works again but i need current cbState value in my myChangeAction function and in click event, the cbState value has not yet changed. It’s the previous value
I tried your example but something is wrong : if we use toggleProperty, OK it works. But if we want to always set cbState to true, your example does not work anymore.
I updated my twiddle (Ember Twiddle) and when we click on last checkbox, its state change whatever the value of cbState