lundi 17 février 2020

How to select check checkbox dynamically from a component in angular 7 when I call the function

I have a Function inside the angular 7 components. Now I want to call this function and get selected checkbox with id , class whatever the possible solution.

get_selected_users(){
     checked_users = [01,333,43,54,656,234,234,324];
     checked_users.forEach(function(element) {
      console.log("element --->",element);
    });

Html code
<input type="checkbox" value="333" />
<input type="checkbox" value="54" />
<input type="checkbox" value="100" />
<input type="checkbox" value="999" /> 








Aucun commentaire:

Enregistrer un commentaire