Can not use LoadingContoller as a service


#1

I am trying to use same approach as I had in ionic 3 and now in Ionic 4 beta it complains.
I create a injectable Loader to be able to start/show a loader from one component/page and close/stop it from another component/page when that page is rendered and finished.
This is specially useful when one is login in with external providers such as google or Facebook and you get redirected back and to your start page, I want the loader to be present during the whole process.

This is the injectable loader that I inject in the component in order to toggle it:

import { LoadingController } from ‘@ionic/angular’;
import { Injectable } from ‘@angular/core’;

@Injectable()
export class Loader {
private loading: any;

constructor(private loadCtrl: LoadingController) { }

async toggleLoader(show: boolean, notification?: string, duration?: number) {
    if (show) {
        this.loading = await this.loadCtrl.create({
            message: notification || 'Please wait..',
            duration: duration,
            cssClass: 'loader',
            spinner: 'bubbles'
        });
        await this.loading.present();
    }
    else {
        if (this.loading) {
            await this.loading.dismiss();
        }
    }
} 

}

Problem is I get millions of these kind of errors now, these are just a few of them:

simultaneously extend types ‘IonChipButton’ and ‘IonChipButton’.
[ng] Named property ‘‘color’’ of types ‘IonChipButton’ and ‘IonChipButton’ are not identical.
[ng] apps/mobile/node_modules/@ionic/core/dist/types/components.d.ts(2821,15): error TS2320: Interface ‘HTMLIonChipButtonElement’ cannotsimultaneously extend types ‘IonChipButton’ and ‘IonChipButton’.
[ng] Named property ‘‘href’’ of types ‘IonChipButton’ and ‘IonChipButton’ are not identical.
[ng] apps/mobile/node_modules/@ionic/core/dist/types/components.d.ts(2829,15): error TS2320: Interface ‘HTMLIonChipIconElement’ cannot simultaneously extend types ‘IonChipIcon’ and ‘IonChipIcon’.
[ng] Named property ‘‘color’’ of types ‘IonChipIcon’ and ‘IonChipIcon’ are not identical.
[ng] apps/mobile/node_modules/@ionic/core/dist/types/components.d.ts(2829,15): error TS2320: Interface ‘HTMLIonChipIconElement’ cannot simultaneously extend types ‘IonChipIcon’ and ‘IonChipIcon’.
[ng] Named property ‘‘name’’ of types ‘IonChipIcon’ and ‘IonChipIcon’ are not identical.
[ng] apps/mobile/node_modules/@ionic/core/dist/types/components.d.ts(2829,15): error TS2320: Interface ‘HTMLIonChipIconElement’ cannot simultaneously extend types ‘IonChipIcon’ and ‘IonChipIcon’.
[ng] Named property ‘‘src’’ of types ‘IonChipIcon’ and ‘IonChipIcon’ are not identical.
[ng] apps/mobile/node_modules/@ionic/core/dist/types/components.d.ts(2837,15): error TS2320: Interface ‘HTMLIonChipElement’ cannot simultaneously extend types ‘IonChip’ and ‘IonChip’.
[ng] Named property ‘‘color’’ of types ‘IonChip’ and ‘IonChip’ are not identical.
[ng] apps/mobile/node_modules/@ionic/core/dist/types/components.d.ts(2845,15): error TS2320: Interface ‘HTMLIonColElement’ cannot simultaneously extend types ‘IonCol’ and ‘IonCol’.
[ng] Named property ‘‘offset’’ of types ‘IonCol’ and ‘IonCol’ are not identical.
[ng] apps/mobile/node_modules/@ionic/core/dist/types/components.d.ts(2845,15): error TS2320: Interface ‘HTMLIonColElement’ cannot simultaneously extend types ‘IonCol’ and ‘IonCol’.
[ng] Named property ‘‘offsetLg’’ of types ‘IonCol’ and ‘IonCol’ are not identical.
[ng] apps/mobile/node_modules/@ionic/core/dist/types/components.d.ts(2845,15): error TS2320: Interface ‘HTMLIonColElement’ cannot simultaneously extend types ‘IonCol’ and ‘IonCol’.
[ng] Named property ‘‘offsetMd’’ of types ‘IonCol’ and ‘IonCol’ are not identical.
[ng] apps/mobile/node_modules/@ionic/core/dist/types/components.d.ts(2845,15): error TS2320: Interface ‘HTMLIonColElement’ cannot simultaneously extend types ‘IonCol’ and ‘IonCol’.
[ng] Named property ‘‘offsetSm’’ of types ‘IonCol’ and ‘IonCol’ are not identical.
[ng] apps/mobile/node_modules/@ionic/core/dist/types/components.d.ts(2845,15): error TS2320: Interface ‘HTMLIonColElement’ cannot simultaneously extend types ‘IonCol’ and ‘IonCol’.
[ng] Named property ‘‘offsetXl’’ of types ‘IonCol’ and ‘IonCol’ are not identical.
[ng] apps/mobile/node_modules/@ionic/core/dist/types/components.d.ts(2845,15): error TS2320: Interface ‘HTMLIonColElement’ cannot simultaneously extend types ‘IonCol’ and ‘IonCol’.
[ng] Named property ‘‘offsetXs’’ of types ‘IonCol’ and ‘IonCol’ are not identical.
[ng] apps/mobile/node_modules/@ionic/core/dist/types/components.d.ts(2845,15): error TS2320: Interface ‘HTMLIonColElement’ cannot simultaneously extend types ‘IonCol’ and ‘IonCol’.

Somehow the interface are colliding in "node_modules/@ionic/core/dist/types/components.d.ts"
Is this a bug or this approach is not workable anymore?