如何在 windows 平台上更换离子旋转器

How to change ion-spinner on windows platform

我的 windows phone 应用程序默认显示 ios 微调器。我想知道如何改变它,因为这个默认微调器在 windows phone 平台上没有动画。因此,我想默认显示 android 微调器,因为这是唯一使用 javascript 进行动画处理的微调器。另一个ion spinners are animated by SMIL animations, which are not supported on IE ().

到目前为止,我发现的最佳方法是在我的应用程序的 angular.config 部分将默认微调器设置为 'android':

myApp.config( moduleConfig );
function moduleConfig( $ionicConfigProvider ) {
    $ionicConfigProvider.platform.default.spinner.icon( "android" );
}

谢谢这对我有帮助,但对于可能 运行 参与其中的其他人....如果您在控制器中设置了 $ionicLoading 模板,则上面的默认值不会覆盖该值。您需要使用上述方法并从模板中删除图标。

之前:

template: '<p class="icon ion-loading-a"><ion-spinner class="spinner-assertive" icon="bubbles"/></p>';

之后:

template: '<p class="icon ion-loading-a"><ion-spinner class="spinner-assertive"/></p>'