Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

No access to promise returned by the Modal template loading #354

Closed
lastnico opened this issue Apr 25, 2013 · 3 comments
Closed

No access to promise returned by the Modal template loading #354

lastnico opened this issue Apr 25, 2013 · 3 comments

Comments

@lastnico
Copy link
Contributor

Because we can't access the promise in charge of loading the template of a Dialog, it is impossible to know whether or not the loading worked fine (and handle error cases related to 4XX and 5XX error codes)

@lastnico lastnico reopened this Apr 25, 2013
@pkozlowski-opensource
Copy link
Member

@lastnico I'm not sure we want to expose the current promise that is used to open the modal. The issue is that there are way too many internals in the results of this promise (content of a partial mostly).

What are the errors you are talking about here? Downloading HTML fragment? Or resolving data?

AngularJS relays on events to propagate info about route change status, we could explore this. At the same time promises are much nicer so we could expose another promise (not the one used internally) so people can monitor progress.

$dialog probably deserves some API refreshing so I will keep this one open and will come back to it when doing changes.

@lastnico
Copy link
Contributor Author

@pkozlowski-opensource Then maybe accessing a promise with a limited scope to handle for instance the failure if the download of the HTML fragment fails, if its compilation fails,...

If indeed some changes in the $dialog API are planned, then let's wait what it will bring new ;) (if possible, could you also think about sending the events show, shown, hide and hidden that are sent by the original Bootstrap implementation, that would be great too ;)

@pkozlowski-opensource
Copy link
Member

It will be handled in #441

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants