I have this app.module.ts code:
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule, ToastController } from 'ionic-angular';
import { IonicStorageModule } from '@ionic/storage';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { ListPage } from '../pages/list/list';
import {EmailComposer} from '@ionic-native/email-composer';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { AuthService } from '../providers/auth-service/auth-service';
import { RegisterPage } from '../pages/register/register';
import { LoginPage } from '../pages/login/login';
import { MainPage } from '../pages/main/main';
import { Example_1Page } from '../pages/example-1/example-1';
import { File } from '@ionic-native/file';
import { SignaturePadModule } from 'angular2-signaturepad';
import { Diagnostic } from '@ionic-native/diagnostic';
import {Subscription} from 'rxjs'
@NgModule({
declarations: [
MyApp,
ListPage,
HomePage,
MainPage,
LoginPage,
RegisterPage,
Example_1Page
],
imports: [
BrowserModule,
SignaturePadModule,
IonicModule.forRoot(MyApp),
IonicStorageModule.forRoot()
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
],
providers: [
Subscription,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
AuthService,
]
})
export class AppModule {}
I need to add Subscription as a provider, as I do above. But when I do, I get the following error:
Error: Can’t resolve all parameters for Subscription: (?).
What is the problem? None of the other providers give me this issue!
EDIT: Why does it say it needs parameters. I tried adding Subscription as a provider for the page but it still didn’t work. This as never happened to me before!