I have a pagination for 100 records each page showing 10 with check boxes where can i can select all 10 records or only one row. I want to get count of all checkboxes selected.
Im using an array to which i push a unique value of row using event binding assigning it true or false based on if checkbox is selected . Im currently using count as temporary variable and making it +1/-1 for each check box selected or deselected.The problem with this is that if i select one row and then select on check box for all records it shows value as 11 instead of 10.
The array which is having correct set of records and length,i can't bind it to the template.It is showing 0, as on init of this component the value is 0.Is there any way i can show the correct data.I thought of ngmodel but read it only works on form.Is there any other way?
Aucun commentaire:
Enregistrer un commentaire