Erma Isabel
Erma Isabel

Reputation: 555

Checking and unchecking the checkbox

I have a check box,

        <div class="large-12 eachRow" ng-repeat="role in bindRoles">
            <input type="checkbox" ng-checked="{{role.View}}"/>
        </div>

It binds the value correctly as in "bindRoles"

How can i perform two way binding? (For instance, Initially value of "role.View" if true and if i uncheck how can i make it reflect in bindRoles Json?)

Upvotes: 1

Views: 56

Answers (1)

Satpal
Satpal

Reputation: 133403

You need to use ngModel

<input type="checkbox" ng-model="role.View" />

Upvotes: 1

Related Questions