ionic checkBox 值绑定

class SaladPage {
// 添加属性状态值
cucumber: boolean;

       //调用方法 打印出是否选中
     updateCucumber() {
           console.log('Cucumbers new state:' + this.cucumber);
             }
           }

html 页面 值绑定 :

         

基础属性设置 : checked = true 默认设置选中。

你可能感兴趣的:(ionic checkBox 值绑定)