Skip to content

Instantly share code, notes, and snippets.

@adash333
Last active July 9, 2017 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adash333/040134fcd460cb93b8244bdcb2363f87 to your computer and use it in GitHub Desktop.
Save adash333/040134fcd460cb93b8244bdcb2363f87 to your computer and use it in GitHub Desktop.
import { AngularFireModule } from 'angularfire2';
import { firebaseConfig } from '../environment';
import { AngularFireDatabaseModule } from 'angularfire2/database';
import { AngularFireAuthModule } from 'angularfire2/auth';
// imports: [ の中に、以下を挿入。(一行前の最後にカンマも挿入)
AngularFireModule.initializeApp(firebaseConfig), // imports firebase/app needed for everything
AngularFireDatabaseModule, // imports firebase/database, only needed for database features
AngularFireAuthModule, // imports firebase/auth, only needed for auth features
// src/environment.ts を新たに作成し、以下のように記載
export const firebaseConfig = {
apiKey: "<firebaseの自分のapiKey>",
authDomain: "<firebaseの自分の......>",
databaseURL: "<firebaseの自分の......>",
projectId: "<firebaseの自分の......>",
storageBucket: "<firebaseの自分の......>",
messagingSenderId: "<firebaseの自分の......>"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment