-
Notifications
You must be signed in to change notification settings - Fork 681
Using angularfire2 with this starter #127
Comments
@beckmeindia what are you trying to accomplish? This starter is for Angular Universal not AngularFire. |
@beckmeindia I think you might be in the wrong repo? https://github.com/angular/angularfire2 |
@joaogarin thank you. I was referring to the wrong docs. |
Hey, Could any of you give ideas about a workaround for it? @manekinekko I have attached the repository here: https://github.com/beckmeindia/universal-angularfire2 I have also tried to address this issue here: r-park/todo-angular-firebase#77 (comment) Thanks, |
@beckmeindia I am gonna take a look at your issue tonight. I'll let you know. |
Thank you so much Wassim
|
@beckmeindia I did some diggings. Here are my tldr: We simply need to add support for AngularFire2. My analysis: One of the issues is coming from the Here are the steps to reproduce this issue:
And then provide a custom implementation with stubbed methods, something like:
Following the base parent class:
But then you will end up with other errors, like this one: So basically, we need a universal AuthBackend implementation. Getting @davideast in the loop ^^ |
@manekinekko Hey Wassem thanks a lot for your time and debugging. Will look forward to changes in the universal Authbackend by @davideast and try to implement what you have said & see if it somehow maybe works. Also could I add you as a collaborator to the present repository so that we can commit new changes and maybe make it a universal-angularfire2-starter ? Cheers, |
@beckmeindia sure |
hey @manekinekko & @davideast |
Others interested in this as well. aspnet/JavaScriptServices#268 |
Hi, I observed that the new angular2-webpack-starter has a very simple approach for integrating Angularfire2 through this: I have observed that the universal-starter uses an earlier version of angular2-webpack-starter. |
Hey @manekinekko Excited to hear about it |
@manekinekko what is the current status of this issue? I am just catching up on open problems and it seems like there was some back and forth on this as we were playing catchup with the angular release. Can you check again on this when you get a chance and let me know? |
I just checked with the updated versions of angularfire2 and angular-universal-nodejs. It works perfectly fine with all the observables and authentication. So it's resolved. Thank you so much guys! |
is anywhere a starter project for angular universal with angularfire? Is am still struggling with it |
Does universal play well with angularfire2? I see from angular/angularfire#191 that it looks like some custom code is needed and using the firebase nodejs version on the server..is that so? |
@doczoidberg @joaogarin can you share some logs or error messages? |
I didn't actually try it yet..but I am thinking about using firebase, and if that is a good idea at this point..I will definitely be using universal. I will try to get some tests running and see what happens. I will report back with what I find. |
Hello, Just out of curiosity I tried putting angularfire2 into this repository and I get the following error :
This was trying to put the Angularfire2 module into the appModule. I guess it could be done via the browsermodule, but then its not possible to inject the angularfire2 service into components that ideally would be render on client and server..basically would be like maintaining two separate apps for server and client which is not so interesting maybe. I think it would be super interesting to have even if just a recommendation on the universal repo on how to use angularfire2 with angular using universal, best practices or something like that. |
@joaogarin instead of importing AngularFireModule you could provide a substitute for AngularFire service in your app.node.module.
I mainly use AngularFire / Firebase for Auth. My AngularFireServer roughly looks like this:
|
Yeah thats what I am doing now, essencialy have a provider for browser and server =) bit of DI swap magic and it works 👍 |
+1. Any update on the possibility of using Universal with angularfire2 4.0.0-rc.0? There is a reference to window in database.js that does not seem to allow this. |
I didn't tries with dB, but auth seems to work fine |
Hey,
I am using Angular2 webpack with Firebase for developing my application. Hence I am using this starter to build the entire application.
I searched through documentation for using firebase or angularfire2 with this but could not find any. The present angularfire2 docs use angular-cli & don't work with this.
Could you please help?
Thanks,
Rahul
The text was updated successfully, but these errors were encountered: