// Initialize Firebase
var config = {
apiKey: "...",
authDomain: "my-project.firebaseapp.com",
databaseURL: "https://my-project.firebaseio.com",
projectId: "my-project",
storageBucket: "my-project.appspot.com",
messagingSenderId: "..."
};
firebase.initializeApp(config);
When I initialize Firebase in index.html or main.js, in both cases i have an error
Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app).
I have to initialize it in my component (Dashboard). Is it proper way to initialize firebase in one of my components? Why i can do this in e.g. main.js ?