After i install the cordova-plugin-advanced-http plugin, when i try to import it on providers in app.modules.ts, i get the following:
I have reinstalled, clean cache, and it keeps happening. Here's the app.module.ts code:
import { HTTP } from '@ionic-native/http';
import { GalleryPageModule } from './../pages/gallery/gallery.module';
import { HttpClient, HttpClientModule } from '@angular/common/http';
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
//providers
import { ImagesProvider } from '../providers/images/images';
//plugins
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { File } from '@ionic-native/file';
import { FileTransfer } from "@ionic-native/file-transfer";
import { AndroidPermissions } from '@ionic-native/android-permissions';
import { SocialSharing } from '@ionic-native/social-sharing';
//firebase
import { firebase } from './../firebase';
import { AngularFireModule } from '@angular/fire';
import { AngularFireDatabaseModule, AngularFireDatabase } from '@angular/fire/database';
import { AngularFireAuthModule } from '@angular/fire/auth';
import { AngularFirestoreModule, AngularFirestore } from '@angular/fire/firestore';
import { ImagenPageModule } from '../pages/imagen/imagen.module';
@NgModule({
declarations: [
MyApp,
HomePage,
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
HttpClientModule,
GalleryPageModule,
AngularFireModule.initializeApp(firebase),
AngularFireDatabaseModule,
AngularFireAuthModule,
AngularFirestoreModule.enablePersistence(),
ImagenPageModule,
GalleryPageModule
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
HttpClient,
ImagesProvider,
AngularFirestore,
File,
HTTP,
FileTransfer,
AndroidPermissions,
SocialSharing,
]
})
export class AppModule {}
I have tried that in other projects i have, and it works, does not appear that HTTPOriginal suggestion.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…