Angularfire: Feat: ng add angularfire2

Created on 21 May 2018  路  7Comments  路  Source: angular/angularfire

If not already in pipeline it would be great to be able to add the angularfire 2 package by a simple ng add angularfire2.

Most helpful comment

I've been working with schematics for AF2 and have the following proposals. Please post ideas and feedback so we can get the ball rolling:


ng add angularfire2/schematics
  • Updates the NgModule with imports, initializeApp, and credentials
  • Installs packages

ng generate component --firestore --auth
  • Generates a component with Firestore and AfAuth injected + some starter code
  • Mocks firebase in the component spec

ng generate module --template <crud|login|forms> 

Generates a fully fleshed-out feature module based on a goal like CRUD, user auth, forms, etc. The idea is here is to provide a best practices example to be used as a starting point or just solve common problems. (This will be the most difficult schemtic to build and maintain)

All 7 comments

I've been working with schematics for AF2 and have the following proposals. Please post ideas and feedback so we can get the ball rolling:


ng add angularfire2/schematics
  • Updates the NgModule with imports, initializeApp, and credentials
  • Installs packages

ng generate component --firestore --auth
  • Generates a component with Firestore and AfAuth injected + some starter code
  • Mocks firebase in the component spec

ng generate module --template <crud|login|forms> 

Generates a fully fleshed-out feature module based on a goal like CRUD, user auth, forms, etc. The idea is here is to provide a best practices example to be used as a starting point or just solve common problems. (This will be the most difficult schemtic to build and maintain)

Has this gone anywhere?

Hey @codediodeio , I think it would be great to start even (or: especially) with having ng add angularfire2 command available that would

  • install the module
  • prepare configuration object to be filled
  • and setup the module

If you're opened to it, I would gladly help with this one (I've already prepared analogous part on other projects)

@sulco That would be amazing. I've not had the time recently to move this forward. Just having ng add would be a valuable addition.

Great, I'm on it then - should have a PR within the next couple of days.

Heya, @sulco any updates on this? I can help if you have any problems :)

@sulco I'm also willing to help out with this if needed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

avanderbergh picture avanderbergh  路  3Comments

itisparas picture itisparas  路  3Comments

jteplitz picture jteplitz  路  3Comments

cre8 picture cre8  路  3Comments

StephenFluin picture StephenFluin  路  3Comments