lundi 19 août 2019

Unable to close the modal when an angular check box is checked

I am using angular step forms. In one of the form, i have few items with checkboxes. When i check the checkbox the Modal window is opening, but i am unable to close the window when close button on the modal window is clicked.

HTML

<div class = "pop">
 <p><input type="checkbox" name="v" value="B" [checked] = "t1()">test</p>
<div>

<div id="myModal" class="modal">
 <!-- Modal content -->
    <div class="modal-content">
        <span class="close" (click) = "close()">&times;</span>
       <h2>Kasse</h2>   
    </div>

  </div>

ts

close(){
  document.getElementById("myModal").style.display = "none";
}
t1(){
  document.getElementById("myModal").style.display = "block"; 
}

Please guide me through this problem.




Aucun commentaire:

Enregistrer un commentaire