mercredi 14 juin 2017

Angular 4,

I have a checkbox in HTML as below and want to have two-way binding with an variable in ts:

...
        </md-grid-tile>
        <md-grid-tile class="grid-box-row"> 
            <md-checkbox ng-model="item.exportable">
            </md-checkbox>
        </md-grid-tile>        
    </div>
    </ng-container>
</md-grid-list>

item.exportable is a boolean defined in ts:

exportable: boolean;

it is shown like this: enter image description here

it's not checked even if the value is true. And click on the checkbox on UI doesn't affect the value displayed after the checkbox. Pleaes help. Thanks.




Aucun commentaire:

Enregistrer un commentaire