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

How to handle checkbox binding

$
0
0

@jufu233_Li wrote:

Hi all!! I am new with ember and I have a question about checkbox binding.

Here is my hbs : {{#each menu}}

Completed

<p class="float-right" id="{{m.id}}" {{input type="checkbox" checked=this.checkCompleteToday click=(action "CompletedToday" menu.id)}} {{/each}}

Menu is a model has a attribute called Completed date, which is a array contains a list of dates(YYYY-MM-DD), there should be a constructor function to check if it’s completed TODAY, if it is completed, make the checkbox of that menu as checked. I don’t know how to handle this actually, do i need to create another attribute for menu?

Any suggestion would be appreciated

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles