From b6a0b10e76865fac6e447b78ea53b81a98621c3d Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 16 Aug 2017 16:29:09 -0400 Subject: [PATCH] fix(loading): set default spinner on loading --- packages/core/src/components/loading/loading.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/core/src/components/loading/loading.tsx b/packages/core/src/components/loading/loading.tsx index 32862e0a25..f462c7605e 100644 --- a/packages/core/src/components/loading/loading.tsx +++ b/packages/core/src/components/loading/loading.tsx @@ -19,6 +19,7 @@ import iOSLeaveAnimation from './animations/ios.leave'; export class Loading { private animation: Animation; private durationTimeout: any; + private mode: string; @Element() private el: HTMLElement; @@ -132,7 +133,15 @@ export class Loading { protected ionViewDidLoad() { if (!this.spinner) { - this.spinner = this.config.get('loadingSpinner', this.config.get('spinner', 'lines')); + let defaultSpinner = 'lines'; + + if (this.mode === 'md') { + defaultSpinner = 'crescent'; + } else if (this.mode === 'wp') { + defaultSpinner = 'circles'; + } + + this.spinner = this.config.get('loadingSpinner') || defaultSpinner; } if (this.showSpinner === null || this.showSpinner === undefined) {