snapjay / ngCart

Really simple shopping cart for AngularJS
http://ngcart.snapjay.com
380 stars 236 forks source link

set data based on checkbox #36

Open duongtdvn opened 9 years ago

duongtdvn commented 9 years ago

Hi, in the data object i had a boolean field for "fragile" status, and I want to bind it with a checkbox, so when user toggle (check, uncheck) the box the fragile status can be updated to true or false. How can i do that? i have tried with item.setData().fragile but no luck.

snapjay commented 9 years ago

You could try adding a $watch of the bound model on the controller and updated the data object when it changes Regards, Dan

Date: Tue, 25 Aug 2015 20:37:27 -0700 From: notifications@github.com To: ngCart@noreply.github.com Subject: [ngCart] set data based on checkbox (#36)

Hi, in the data object i had a boolean field for "fragile" status, and I want to bind it with a checkbox, so when user toggle (check, uncheck) the box the fragile status can be updated to true or false. How can i do that? i have tried with item.setData().fragile but no luck.

— Reply to this email directly or view it on GitHub.