-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With emulator #2738
With emulator #2738
Conversation
@@ -3,6 +3,8 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; | |||
import { ThemeService } from '@blockframes/ui/theme'; | |||
import { IconService } from '@blockframes/ui/icon-service'; | |||
import { TunnelService } from '@blockframes/ui/tunnel'; | |||
import firebase from 'firebase'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error in the console says that firebase SDK should be imported like that
import * as firebase from 'firebase/app';
import 'firebase/<PACKAGE>';
constructor(private router: Router, private analytics: FireAnalytics) { | ||
if (window.location.hostname === 'localhost') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "?" after window in window?.location
because the app can be rendered in a server (SSR/prerendering) where window doesn't exist.
if (window.location.hostname === 'localhost') { | ||
console.log('testing locally -- hitting local functions and firestore emulators'); | ||
theFirebase.functions().useFunctionsEmulator('http://localhost:5001'); | ||
theFirebase.firestore().settings({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is this issue thread about the emulator :
angular/angularfire#2183
According to the last comment you should be able to add host & ssl directly in the env config.
e0dfb79
to
5b1863c
Compare
looks to me stale |
State issue number in your PR to close it when PR merged: issue #XXX
e.g. : "Resolve the bundle size ❤️: issue #1234"