Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$ionicLoading option for default template #1800

Closed
umurgdk opened this issue Jul 17, 2014 · 3 comments
Closed

$ionicLoading option for default template #1800

umurgdk opened this issue Jul 17, 2014 · 3 comments

Comments

@umurgdk
Copy link

umurgdk commented Jul 17, 2014

It seems I have to re enter the template whenever I want show loading indicator. But simply I only need to show simple rotating icon like .ion-loading-d. I think there must be an option to set default template for every loading indicator. For now I resolve the issue with creating a wrapper service like myLoading to pass default template to $ionicLoading.show()

angular.module 'myapp.services'
.service 'myLoading', ($ionicLoading) ->
  template = '<i class="ion-loading-d"></i>'

  @show = (opts) ->
    opts ?= {}
    opts.template = template unless opts.template
    $ionicLoading.show(opts)

  @hide = -> $ionicLoading.hide()

  return @
@ajoslin
Copy link
Contributor

ajoslin commented Jul 21, 2014

http://ionicframework.com/docs/nightly/api/object/$ionicLoadingConfig

It's in nightly builds, and will land in the next release.

@umurgdk
Copy link
Author

umurgdk commented Jul 21, 2014

@ajoslin Super thanks 👍

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 2018

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 ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
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