I am using Angularjs UI bootstrap
to render Modal windows in my project. But In some situation I want to call a function after the modal loads. I have tried with $timeout
and $viewContentLoaded
but no use. can any one help me to resolve this issue.
Thank you all.
I go through the documentation of angular ui bootstrap and finally I found the solution.
The
open
method returns amodal instance
, an object with theopened
propertie:opened
- apromise
that is resolved when a modal gets opened after downloading content's template and resolving all variablesto call function after model opens.
Alternatively, you can use:
PS: this was originally pointed by @esqew user. I put it here just to be easier to find.