can anybody tell me how should I retrieve values of selected checkboxes in angularjs. I will give you a brief scenario. I have an object called 'user' in which I have a list of permissions as a member of 'user'. Now in jsp I have several check boxes, what I want is when I check checkboxes the values of selected checkboxes should be mapped with permission list whoch is present in the 'user', How can I do that.? I will show my permission checkboxes jsp code which is as follows
<div class="form-group required">
<label for="Permissions" class="col-sm-3 control-label">Permissions</label>
<div class="col-sm-6 Nopadding" data-ng-model="ctrl.user.permissionVoList.permissionId">
<div class="checkbox" data-ng-repeat="permissionVo in ctrl.permissionVoList" >
<label data-toggle="tooltip" data-placement="right"
data-html="true"
title="<p align='left'></p>">
<input type="checkbox" value= />
</label>
</div>
</div>
</div>
and 'user' object in the controller is as follows
self.user={
userId:'1',
firstName:'Vishal',
middleName:'Vasant',
lastName:'Raut',
phoneNumber:'9898989898',
emailId:'vishal@gmail.com',
username:'vishal',
password:'111111',
notification:'no',
costPerHour:'1000',
roleVo:{roleId:''},
shiftVo:{shiftId:''},
permissionVoList:[{permissionId:''}]
};
Aucun commentaire:
Enregistrer un commentaire