import { CommonModule } from '@angular/common' ; import { HttpClientModule } from '@angular/common/http' ; import { NgModule } from '@angular/core' ; import { BrowserAnimationsModule } from '@angular/platform-browser/animations' ; import { RouterModule } from '@angular/router' ; import { environment } from '../environments/environment' ; import { AngularFireModule } from '@angular/fire' ; import { AngularFireAuthModule } from '@angular/fire/auth' ; import { AngularFirestoreModule } from '@angular/fire/firestore' ; import { AngularFireFunctionsModule , FunctionsRegionToken } from '@angular/fire/functions' ; import { DeviceDetectorModule } from 'ngx-device-detector' ; import { AppRoutingModule } from './app-routing.module' ; import { CoreModule } from './core/core.module' ; import { SharedModule } from './shared/shared.module' ; import { AppComponent } from './app.component' ; export function tokenGetter ( ) { return localStorage . getItem ( 'access_token' ) ; } @ NgModule ( { declarations : [ AppComponent , ] , imports : [ AngularFireAuthModule , AngularFireModule . initializeApp ( environment . firebase ) , AngularFirestoreModule . enablePersistence ( ) , AngularFireFunctionsModule , BrowserAnimationsModule , CommonModule , DeviceDetectorModule . forRoot ( ) , HttpClientModule , RouterModule , AppRoutingModule , CoreModule , SharedModule , ] , providers : [ { provide : FunctionsRegionToken , useValue : 'us-central1' } , ] , bootstrap : [ AppComponent ] , } ) export class AppModule { }