vendredi 29 juillet 2016

how to change a expression in a ngFor on a selection of checkbox angular 2

this is my html code

<tr *ngFor="let Resolution of Resolutions">
                        <td></td>
                        <td>
                        <div class="col-sm-10 ">
                            <div *ngFor="let Suggestion of Resolution.Suggestions">
                                <label >
                                    <input #t (change)="actualActions(t.checked)" type="checkbox" value="" checked="" class="i-checks"> 
                                </label>
                            </div>
                        </div>
                        </td>
                        <td><textarea value=""></textarea></td>
                    </tr>

first column will display some text and in the second column it will display checkboxes using another ngFor . when i select any of the checkboxes, in the third column i want to display whichever checkboxes are selected.

i know how to do this in jquery but not in Angular2 here when i am printing the selected values to the third column. all of the third column data is changing in the table i want checked values of the second column of each row to display in the third column of that perticular row




Aucun commentaire:

Enregistrer un commentaire