Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4840

Ember's checkbox and 'checked' attribute : two-way binding not works?

$
0
0

@Myrdhin wrote:

I do not understand. When I try this code:

my index.hbs :

<input type="checkbox" checked={{cbState}} /> {{cbState}}<br />
{{input type="checkbox" checked=cbState}} {{cbState}}

my controller index.js:

import Ember from 'ember';

export default Ember.Controller.extend({
    cbState: false
});

If i check a checkbox, cbState is always false... Why ? I hope cbState change to true...

Thanks for your help.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4840

Trending Articles