0

I have an application using angular 1.6.9. We are using components.

Issue:

I would like open one modal dialog when the main view is loaded completely. Main Veiw contains multiple views which are like different components.

I have tried lots of things like

  • $postLink()
  • $viewContentLoaded
  • creating directive as mentioned here

But still I am not get to the event which is emitted when full view is rendered. Is there a way to figure that out?

anand
  • 11,071
  • 28
  • 101
  • 159
  • Such event doesn't exist. Whats so important to display this modal after "everything" have been loaded? – lin Mar 17 '18 at 13:51
  • This is the requirement, but is there a solution to this problem? – anand Mar 17 '18 at 13:52
  • I think you can find a solution over here: https://stackoverflow.com/questions/14968690/sending-event-when-angular-js-finished-loading/23717845#23717845 ... but why do you need to display this modal after "everthing" has been loaded? – lin Mar 17 '18 at 13:56
  • @lin you are pointing to same link that I have mentioned above. And I cannot control requirements. – anand Mar 17 '18 at 13:58
  • Yes I know. But could you please answer my question? – lin Mar 17 '18 at 13:58
  • if url querystring contains some keyword then this main view will be opened along with modal dialog. This modal can be also be opened by button click in main view . – anand Mar 17 '18 at 14:02
  • 1
    Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/167019/discussion-between-lin-and-anand). – lin Mar 17 '18 at 14:11

1 Answers1

-1

$timeout will execute what's inside it on the next digest cycle. Drop it in your views controller.

Mathew Berg
  • 28,625
  • 11
  • 69
  • 90