first I'm sorry, this is the first time I ask a question on a forum and I don't speak english very well... I'm working on an application with Ionic 3 and I'm getting this error when I try to use firebase :
Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app)
Here are my files :
App.module.ts :
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { AngularFireModule } from 'angularfire2';
import { AngularFireAuthModule } from 'angularfire2/auth';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import {TabsPage} from "../pages/tabs/tabs";
import {ListPage} from "../pages/list/list";
import {AuthPage} from "../pages/auth/auth";
import {AuthService} from "../Services/Authentification/auth.service";
import {FIREBASE_CONFIG} from "./app.firebase.config";
@NgModule({
declarations: [
MyApp,
HomePage,
TabsPage,
ListPage,
AuthPage,
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
AngularFireModule.initializeApp(FIREBASE_CONFIG),
AngularFireAuthModule,
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
TabsPage,
ListPage,
AuthPage,
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
AuthService,
]
})
export class AppModule {}
app.firebase.config :
export const FIREBASE_CONFIG = {
apiKey: "...",
authDomain: "...",
databaseURL: "...",
projectId: "...",
storageBucket: "...",
messagingSenderId: "..."
};
I've search solutions on others forum but nothing worked. If you need more information tell me