refactor(): deprecate web component controllers (#19109)

This commit is contained in:
Manu MA
2019-08-27 14:00:45 +02:00
committed by GitHub
parent 3e63b3c2c4
commit a65d897214
71 changed files with 1435 additions and 1461 deletions

View File

@ -3,7 +3,7 @@ import { Component, ComponentInterface, Element, Event, EventEmitter, Host, Meth
import { config } from '../../global/config';
import { getIonMode } from '../../global/ionic-global';
import { Animation, AnimationBuilder, OverlayEventDetail, OverlayInterface, SpinnerTypes } from '../../interface';
import { BACKDROP, dismiss, eventMethod, present } from '../../utils/overlays';
import { BACKDROP, dismiss, eventMethod, prepareOverlay, present } from '../../utils/overlays';
import { sanitizeDOMString } from '../../utils/sanitization';
import { getClassMap } from '../../utils/theme';
@ -30,7 +30,7 @@ export class Loading implements ComponentInterface, OverlayInterface {
animation?: Animation;
mode = getIonMode(this);
@Element() el!: HTMLElement;
@Element() el!: HTMLIonLoadingElement;
/** @internal */
@Prop() overlayIndex!: number;
@ -113,6 +113,10 @@ export class Loading implements ComponentInterface, OverlayInterface {
*/
@Event({ eventName: 'ionLoadingDidDismiss' }) didDismiss!: EventEmitter<OverlayEventDetail>;
constructor() {
prepareOverlay(this.el);
}
componentWillLoad() {
if (this.spinner === undefined) {
const mode = getIonMode(this);