In a modal, there is a link using ui-sref to go to another page.
This modal is opened from a first page.
So when I’m clicking on the link, the first page behind the modal change to the second page but the modal doesn’t hide itself. And the modal can’t be closed because of closing function is set in the controller of the first page.
How can I close the modal when clicking on a ui-sref or changing state ?