lundi 24 octobre 2016

Input type checkbox Angular to be checked if object value is string of 1

In my controller I have object of properties in which

isSampleData = "1"   

this is a string value and if it is "1" then I want the checkbox to be checked

Controller is

$scope.client

HTML template

<strong></strong>

However I want to not have it in a template but as a checkbox

Can and Should I use ng-model ?

<input type="checkbox"
     ng-model="string"
     value="string" 
     ng-value="string"/>

Obviously that code is not using the client.IsSampleData




Aucun commentaire:

Enregistrer un commentaire