likeastore / ngDialog

Modals and popups provider for Angular.js applications
http://likeastore.github.io/ngDialog
3.14k stars 692 forks source link

Showing overlay is template is URL and is loading #472

Open longzheng opened 8 years ago

longzheng commented 8 years ago

Not an issue. Just asking if you're open to this idea.

Currently we use ngDialog in our web app. We load a lot of dialogs via a URL so the template loads asynchronously.

We've modified ngDialog to insert/render the dialog overlay as soon as the open method is activated. And then upon the template finished loading, we render the dialog content.

If the loadTemplateUrl fails, we also use the $http.get() error state to close the dialog so the overlay is hidden.

I know you added ngDialog.templateLoading and ngDialog.templateLoaded broadcasts but unfortunately it doesn't do exactly what we want since we actually want to use the native ngDialog overlay than providing a custom loading overlay that we show/hide during this transition state.

My question then is this a change/suggestion you're open to? If so we can do a pull request with our modifications for you to review.

piyushdutta commented 8 years ago

Hi Longzheng i am kinda stuck in a similar area. You mentioned you are able to open a template(url) inside the dialog. These URL's ae they generic or dynamic. I want to open a dynamic url inside the dialog. Any tips as to how should i go about it ?

AnghelGabriel commented 7 years ago

Curios if this is possible. I'm looking for the same ideea.