Modal doesn't hide when change page with ui-sref

Hi,

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 ?

Thx.

is ng-click instead of ui-sref --> define a function that first --> closes the modal and if the modal has finished closing --> redirect with state.go.

1 Like

Ok thanks for your solution.
I will try and confirm you its ok