Angular Material • What is it? UI component library or CDK (Component Development Kit) Angular Component suit @angular/cdk Material Design Style elements @angular/material
Example of Angular Material Components
Subject, Observers and Subscriptions Observer Subject Subject Observer I am Observer I will do what is needed if my Observable state changes Subscription My Observer subscribed to me at her birth (ngOnInit)
Creating a Subject using RxJs
. Creating a Observer using RxJs
• What is FireBase? A Mobile and Web Application Development Platform • Why FireBase? Develop apps with No Backend
Creating a project in FireBase
Create Database in FireBase (Cloud Firestore)
Create Database in FireBase (Cloud Firestore)
• What is Cloud FireStore? Cloud-hosted, NoSQL database with Native SDKs for iOS, Android, WebApps, JAVA, etc • Rules of FireStore: • Cannot have collection inside a collection • Collections can only contain Documents • Document can contain Data and sub- connections • Data is Text which is usually key value pairs like JSON • CloudFireStore is not meant to store Files or images only Text Data Anatomy of Cloud Firestore
Adding Collections, Documents and Fields
Grab the API Key from the Project settings
Copy paste the API key into environment.ts
What is AngularFire? • Observable based : Use the power of RxJS, Angular, and Firebase • Realtime bindings : Synchronize data in realtime • Authentication : Log users in with a variety of providers and monitor authentication state. • NgRx friendly : Integrate with ngrx using AngularFire’s action based APIs.
Import AngularFireModule and intializeApp
Import AngularFirestoreModule
Exercise Model
Using AngularFire to retrieve Data as snapshotChanges
Using AngularFire to retrieve Data as valueChanges collection
Collections in AngularFirestore https://github.com/angular/angularfire2/blob/master/docs/firestore/collections.md
snapshotChanges vs valuechanges collection
What is AngularFireAuth? • Observable based: As
Setup Authentication in FireBase
Available options for Authentication
Enable Sing-in method: Email/Password
Import AngularFireAuthModule
As the app loads ngOnInit call initAuthListener
Subscribe to AngularFireAuth authState to redirect accordingly
Deploying app to FireBase Hosting
Intall the required firbase-tools
Firebase login step
Firebase init step
Copy api key to environment.prod.ts
Application in production • https://ng-fitness-tracker-7d01f.firebaseapp.com/login • Finally App gets deployed 

Angular material,firebase, and angularfire