I would like to add @angular/fire into my Nx workspace (Angular app).
I'm trying to keep in line with best practices, however, there's nothing in the official docs regarding adding this library into the workspace.
Or am I missing something?
- INSTALLATION
- is it OK to install the lib via the standard command?
- npm i @angular/fire ... or ... ng add @angular/fire
- Is there a specific 'Nx way' of installing it?
- is it OK to install the lib via the standard command?
- PLACING & NAMING
In which module should I call the initializeApp() method?in the AppModule? (this is how I used to do it before adopting Nx)
or a lib module? (this seems to me closer to the Nx philosophy)
if the answer is 'a lib module'
- which module should it be?
- where should I put the lib/module and what should I name it?
- would 'libs/data-access/api' be a good idea?
- USING THE API
- How do I use the installed package and initialized module(lib)?
- Should I import the api lib multiple times into every lib that would need the functionality?
- Or do I import the api lib only once into the app?
Sticking to best practices (naming conventions, etc.) so tightly might seem silly, but I really want to do things the right way.