I don't see an option to display both spinner and label message! Docs.
Is there a simple way to do this or it must be something that I have to do myself?
Example (it doesn't have to look like this of course): http://www.jqueryscript.net/images/jQuery-Ajax-Loading-Overlay-with-Loading-Text-Spinner-Plugin.jpg
Thanks!
The default spinner to use is based on the platform. The default spinner for ios is "lines" , and the default for android is "crescent" . If the platform is not ios or android , the spinner will default to crescent . If the name property is set, then that spinner will be used instead of the platform specific spinner.
Add a class spin and set text align center. Save this answer.
Using Loading First, we need to inject $ionicLoading in our controller as dependency. After that, we need to call the $ionicLoading. show() method and loading will appear.
You can try this:
$ionicLoading.show({
template: '<ion-spinner></ion-spinner> <br/> My Label'
});
Not tested, I think it will show up the spinner, but maybe no animation.
You can load your template:
<script id="loading.html" type="text/ng-template">
<ion-spinner icon="bubbles"></ion-spinner>
<p>LOADING...</p>
</script>
and in your code:
$ionicLoading.show({
templateUrl: 'loading.html'
// noBackdrop: true
});
or, as Nam Pham suggested, defined an inline template:
$ionicLoading.show({
template: '<ion-spinner icon="bubbles"></ion-spinner><p>LOADING...</p>'
// noBackdrop: true
});
If you want you can defined a different spinner.
You can see how it works here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With