mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
refactor(loading): keep instance private
This commit is contained in:
@ -128,12 +128,11 @@ export class Loading {
|
|||||||
this.animation = null;
|
this.animation = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ionLoadingWillPresent.emit({ loading: this });
|
this.ionLoadingWillPresent.emit();
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.enterAnimation || this.config.get('loadingEnter', this.mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
const animationBuilder = this.enterAnimation || this.config.get('loadingEnter', this.mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
return this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
return this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||||
this.animation = animation;
|
this.animation = animation;
|
||||||
@ -198,7 +197,7 @@ export class Loading {
|
|||||||
if (this.showSpinner === null || this.showSpinner === undefined) {
|
if (this.showSpinner === null || this.showSpinner === undefined) {
|
||||||
this.showSpinner = !!(this.spinner && this.spinner !== 'hide');
|
this.showSpinner = !!(this.spinner && this.spinner !== 'hide');
|
||||||
}
|
}
|
||||||
this.ionLoadingDidLoad.emit({ loading: this });
|
this.ionLoadingDidLoad.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidEnter() {
|
componentDidEnter() {
|
||||||
@ -211,11 +210,11 @@ export class Loading {
|
|||||||
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
|
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ionLoadingDidPresent.emit({ loading: this });
|
this.ionLoadingDidPresent.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUnload() {
|
componentDidUnload() {
|
||||||
this.ionLoadingDidUnload.emit({ loading: this });
|
this.ionLoadingDidUnload.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Listen('ionDismiss')
|
@Listen('ionDismiss')
|
||||||
|
|||||||
Reference in New Issue
Block a user