Vyacheslav Kovalchuk
Vyacheslav Kovalchuk

Reputation: 363

How can I detect that all page components were loaded in Oro application?

I have a task to get some data from API asynchronously - page loads, components initialize and fill data object with mediator, and after all components were initialized - send request, get it and do some other logic. So, the question is, how can I detect that all page components have been initialized?

Upvotes: 1

Views: 111

Answers (1)

Hryhorii Hrebiniuk
Hryhorii Hrebiniuk

Reputation: 526

Mediator triggers page:afterChange event once all standard components are initialized and ready to use. So you can listen to that event.

https://doc.oroinc.com/frontend/javascript/#page-controller

Upvotes: 2

Related Questions