Closed jlmonteagudo closed 3 years ago
Hi @jlmonteagudo I'm trying to do the same thing, did you ever get it working?
I haven't been able to find documentation that supports the ability to return a ModuleWithProviders
that includes an imports
property, only a providers
property, nor was I able to get this working by fiddling around with the code. Are you aware of something I'm not? I would love to be able to use angularfire inside a library as well, but for the life of me, haven't found a way to do it yet. :(
Since we've switched to using providedBy any in Firebase v6 this should be a lot easier. Closing as outdated.
I have created a library to manage all the Firebase access logic in the library, but I'm getting an error initializing Firebase in my library.
The idea is to isolate my app from Firebase. So, the library is going to manage the Firebase database access and the app won't know anything about Firebase (only will know the firebase config information).
Version info
Angular: 8.2.0
Firebase: 7.2.0
AngularFire: 5.2.1
How to reproduce these conditions
Create a library and define the main module of the library in this way:
data-access.module
Then initialize the library in the app in this way:
app.module
Debug output
In the web browser console I get this error:
Could you help me explaining the best way to manage this use case?
Thank you very much in advance.