How to get multiple checkbox value on button click?


<td><p><input  class="checkbox"  type="checkbox" value=""> </p> </td>

this is list of cars id with checkbox.

<button (click)="duplicate()" ></button>

on this button click i want to get value of all cars in my .ts file. here is the function in .ts

    var checkedValue = document.querySelector('.messageCheckbox:checked');

how to get value of all checked item in one click?