Window Service and Resolver

1 Answer 113 Views
Window
Ritu
Top achievements
Rank 1
Ritu asked on 20 Oct 2021, 02:00 PM

I am opening a popup window using kendo window service to display a component,

I want to implement resolver so I will have data before displaying the component.

How can I do this with kendo window service?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 22 Oct 2021, 07:50 AM

Hi Ritu,

If you need to retrieve some data from a remote service, and open the Window only when this data is available on the client, this can be accomplished by using any asynchronous mechanics for performing and consuming HTTP requests (most typically RxJS, but can also be done through Promises).

The workflow will be along these lines:

- The end user performs some action (like clicking a button) that starts the whole process (which will end with opening of the Window)

- The event, triggered from the user action is handled by the developer

- In the event handler, a data service method which will perform the HTTP request is called, and we are subscribing to receiving the result of the remote server call (containing the needed data)

- In the subscription (if RxJS is used, and the "then" callback if Promise is used), we are opening the Window through the service

Here is a runnable example that demonstrates the described approach:

https://stackblitz.com/edit/angular-yexzqn?file=app%2Fapp.component.ts

I hope this helps.

On a side note, we are trying to avoid possible misunderstanding or providing duplicate information when customers open multiple threads for the same question, so could you please open only one thread per issue/question (a public or private one in accordance with your preference). This will facilitate a tidier support history of your account and better support service. Thank you in advance.

Regards,
Dimiter Topalov
Progress Telerik

Remote troubleshooting is now easier with Telerik Fiddler Jam. Get the full context to end-users' issues in just three steps! Start your trial here - https://www.telerik.com/fiddler-jam.
Tags
Window
Asked by
Ritu
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or