最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Ionic Framework - $ionicLoading: How to display both spinner and label? - Stack Overflow

programmeradmin3浏览0评论

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): .jpg

Thanks!

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!

Share Improve this question edited Nov 11, 2015 at 8:55 Nam Pham 1,22413 silver badges39 bronze badges asked Oct 27, 2015 at 16:47 SupimpaAllTheWaySupimpaAllTheWay 1,4583 gold badges17 silver badges23 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 17

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.

发布评论

评论列表(0)

  1. 暂无评论