Can anyone help me with angular 5 integration with firebase real time?

-1

I need to integrate the firebase database with an angled application. 5. I got the code generated by the firebase, I created a firebase config file and put it there I did the import into the module. I'm having trouble writing at the bank and getting the information there. Could someone help me?

    
asked by anonymous 04.05.2018 / 21:35

1 answer

0

enviroment.ts

export const environment = {
  production: false,
  firebase: //copiar o objeto de configuração.    
  apiUrl: suaUrl
};

app.module.ts

import { AppComponent } from './app.component
import { AppRoutingModule } from './app-routing.module';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AngularFireModule } from 'angularfire2';
import { AngularFireAuth } from 'angularfire2/auth';
import { environment } from '../environments/environment';

@NgModule({
  declarations: [
    AppComponent       
  ],
  imports: [
    BrowserModule,
    AngularFireModule.initializeApp(environment.firebase),,
  ],
  providers: [AngularFireAuth],//se quiser usar a auth do firebase
  bootstrap: [AppComponent]
})
export class AppModule { }
    
07.05.2018 / 10:49