Mini angularfire2 API showcase of angularfire2/auth, angularfire2/database, angularfire2/firestore and angularfire2/storage, tutorials, snippet compilations and demo app.
Download firebase and angularfire2 packages npm i firebase angularfire2 --save Import these in your app.module.ts and setup environments folder. see how to setup environments folder in Usage header below.
import { AngularFireModule } from 'angularfire2';
import { AngularFireAuthModule } from 'angularfire2/auth';
import { AngularFirestoreModule } from 'angularfire2/firestore';
import { AngularFireDatabaseModule } from 'angularfire2/database';
import { AngularFireStorageModule } from 'angularfire2/storage';@NgModule({
...
imports: [
...
AngularFireModule,
AngularFirestoreModule,
AngularFireAuthModule,
AngularFireDatabaseModule,
AngularFireStorageModule,
],
})Snippets / Demo / firebase docs / angularfire2 docs
For
angularfire2/authmini API showcase and snippet collection, go here.
- Sign up / Sign in with Email and Password
- Sign in Anonymously
- Sign out
- Authenticate using Social Media accounts
- Update Email
- Update Password
- Update Profile
| API | |
|---|---|
| Sign up (Email and password) | createUserWithEmailAndPassword() |
| Sign in (Email and password) | signInWithEmailAndPassword() |
| Sign out | signOut() |
| Social Media | signInWithPopup() |
| Update email address | updateEmail() |
| Update password | updatePassword() |
| Update profile | updateProfile() |
Snippets / Demo / firebase docs / angularfire2 docs
CRUD Operations in both List & Object
For
angularfire2/databasemini API showcase and snippet collection, go here.
| Object | List | |
|---|---|---|
| Create | set() / update() |
push() |
| Read | valueChanges(), snapshotChanges() |
valueChanges(), snapshotChanges() |
| Update | set() / update() |
set() / update() |
| Delete | remove() |
remove() |
Snippets / Demo / firebase docs / angularfire2 docs
For
angularfire2/firestoremini API showcase and snippet collection, go here.
| API | |
|---|---|
| Create | add() |
| Read | valueChanges(), snapshotChanges() |
| Update | update() |
| Delete | remove() |
Snippets / Demo / firebase docs / angularfire2 docs
For
angularfire2/storagemini API showcase and snippet collection, go here.
- Upload file
- Download file
- Remove file
| API | |
|---|---|
| Upload | put() |
| Download | getDownloadURL() |
| Delete | delete() |
git clone https://github.com/ElecTreeFrying/angularfire2-demo-app.gitcd angularfire2-demo-appnpm install
Create your own firebase app.
-
Select Add Project
-
Select Authentications
-
Click copy WEB SETUP
-
Create the environment files below in
src/environments/.environment.prod.ts
export const environment = { production: true, firebaseConfig: { **PASTE WEB SETUP** } };
environment.ts
export const environment = { production: false, firebaseConfig: { **PASTE WEB SETUP** } };
- @angular/cli:
6.1.1 - firebase:
5.3.0 - angularfire2:
5.0.0-rc.11
MIT