ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

A more flexible $ionicLoader

Open dmackerman opened this issue 12 years ago • 4 comments

Hey ya'll,

First off, love the framework. Amazing job.

How do we feel about more flexible solution for $ionicLoader? Before I start a PR I wanted to know if there were plans to make the loader more flexible in the future? :smile:

At the moment it simply takes a string in template and simply spits that out inside the .loading div. In my app, I've created a service that wraps $ionicLoading and automatically triggers loading masks, removes them when promises resolve, allows me to change and update the loading mask text in between promises, etc.

It would be wonderful if we could change templates on the fly, set different animations, etc. In general making the "loading" less loading'y and more notification'y, or similar to how Android does it's toast notifications.

dmackerman avatar Aug 01 '14 02:08 dmackerman

I think a lot of what you are looking for already exists. Per the docs, you can use a templateUrl instead of a string, adjust delays, auto hide, etc. Combining these let you accomplish pretty much anything you would typically do with a toast notification: http://ionicframework.com/docs/api/service/$ionicLoading/

mbuster avatar Aug 01 '14 17:08 mbuster

Right, but the templateUrl config doesn't let you specify the entire template, just what goes inside the <div> that gets displayed.

dmackerman avatar Aug 01 '14 19:08 dmackerman

Going to close this for now. We have a trello board to handle all feature request so they can be discussed there.

https://trello.com/c/sQ2z5I5z/49-expand-ionic-loading

mhartington avatar Aug 06 '14 17:08 mhartington

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Sep 06 '18 13:09 ionitron-bot[bot]