1

I am trying to show Loading animation using Ionic2 for long service progress report:

this.loading = this.loadingCtrl.create({
    content: 'Please wait...',
    spinner: 'ripple' // <<------ Is that correct?
});

this.loading.present();

The result is a text box without any spinner.

This is 09/22/2016 Ionic2 using latest beta (11) and I cannot actually find any example like above anywhere. Could this be a future feature documented but not yet implemented?

I am talking about the Ionic2 LoadingController documentations here

4

2 回答 2

2

ripple自定义微调器吗?否则,您可以在此处检查默认可用的微调器:

ios 
ios-small   
bubbles 
circles 
crescent    
dots

微调器名称应该在微调器属性中传递,任何可选的 HTML 都可以在内容属性中传递。如果您不向微调器传递值,则加载指示器将使用模式指定的微调器。要在应用程序中设置微调器名称,请在应用程序的配置中设置 loadingSpinner 的值。要隐藏微调器,请在应用程序的配置中设置 loadingSpinner: 'hide' 或在加载选项中传递微调器:'hide'

因此,另一种选择是仅根据以下模式使用指定的 spynner:

this.loading = this.loadingCtrl.create({
  content: 'Please wait...'
});

this.loading.present();
于 2016-09-22T14:59:01.770 回答
0

问题是 Ionic 团队可能只是使用自定义微调器扩展了 Loading 控件,这意味着您必须将 SVG 文件名放入属性中。

很明显,您可以在其中放置一个内置微调器名称。再说一次,在所有加载器中使用相同的微调器保持应用程序的设计是合理的。猜猜在文档中可能会更粗体......

于 2016-09-22T19:01:09.390 回答