good day .. I have this code and I need to send the role..but when I select the checkbox the ngModel changes to True or False and it is what is sent to the DB..How can I solve it?
<mdl-checkbox class="mdl-textfield--full-width" *ngFor="let role of roles; let i = index"
[(ngModel)]="user.roles[i] " name="ckb{{i}}">
{{role.name}}
</mdl-checkbox>
May be you can set user roles in change
event? Like (change)="userRoles[i] = role"
A sample plunkr using Angular only: