title: ionic-modal auto close when route changes
body: <p>So i have created a modal with the <a href="https://ionicframework.com/docs/api/modal" rel="nofollow noreferrer">ion-modal</a> component.</p>
  
  <p>This works fine however when ever i change route the modal stays open meaning that the new site is hidden behind the modal that i stil open.</p>
  
  <p>i have looked over the documentation but i couldnt find anything that allows me to control it.</p>
  
  <p>a hack would be to check for route changes but i don't feel that this is the right way to do it.</p>
  
  <p>So my question is how do i make sure that the modal automatically closes when i change route.</p>