hamedbaatour / Angularfire Lite
Programming Languages
Labels
Projects that are alternatives of or similar to Angularfire Lite
AngularFire Lite
lightweight wrapper to use Firebase API with Angular.
Features | AngularFire Lite | AngularFire2 |
---|---|---|
Authentication | βοΈ | βοΈ |
Firestore | βοΈ | βοΈ |
Storage | βοΈ | βοΈ |
Realtime Database | βοΈ | βοΈ |
Cloud Messaging | βοΈ | β |
Server Side Rendering | βοΈ | β β |
State Transfer | βοΈ | β |
Transactions and Batched Writes | βοΈ Observable Based |
β |
NPM Package Size | 84 KB β‘οΈ | 124 KB π’ |
Finally SSR with Firebase!
Angularfire Lite is the very first angular library to support server side rendering with firebase.
-
π Supports Both Firebase Databases: Firestore & Realtime Database
-
π No Flickering whatsoever when the app bootstraps
-
β‘οΈ Better performance
-
π Search engine optimization
-
βΊοΈ Easy implementation
Getting Started
Reminder: don't forget to install nodejs first.
npm install --save angularfire-lite firebase
How?:
-
Create a firebase account and login to your dashboard
-
Click on 'Add Firebase to your web app' icon and copy the config object
-
Add it to
environment.ts
&environment.prod.ts
located under/src/environments/
export const environment = {
production: false, // production: true => in `enviroment.prod.ts`
config: {
apiKey: '<your-key>',
authDomain: '<your-project-authdomain>',
databaseURL: '<your-database-URL>',
projectId: '<your-project-id>',
storageBucket: '<your-storage-bucket>',
messagingSenderId: '<your-messaging-sender-id>'
}
};
How?:
-
Import the config object we created from
enviroment.ts
-
Import
AngularFireLite
and pass it the config object
import { AngularFireLite } from 'angularfire-lite';
import {environment} from '../environments/environment';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AngularFireLite.forRoot(environment.config)
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
-
Observable based: Every function returns an Observable that you should subscribe to it to get back the data.
-
Simple API: AngularFire Lite has a simple straight forward syntax similar to the native Firebase API plus some simple additions.
Documentation
You can also clone the live demo to use it as a starting point in the meantime as AFL CLI gets launched officially soon. so stay tuned!
Angular 5:
DEMO APP
Ionic 2:
DEMO APP
Users
- Will be there any breaking changes to AngularFire Lite?
AngularFire Lite will try to avoid breaking changes as much as possible and keep the API consistent across all the firebase services provided.
Contributors:
- How can I contribute?
We want to keep AngularFire Lite in sync with the Firebase API so if any new feature comes out don't hesitate to send a PR.
- Why AngularFire Lite is so simple?
Why add unnecessary complexity in simplicity draws a straight line to productivity.
- Why there are no tests?
currenty the demo is our primary test but there will be proper tests in the future.
Team:
Hamed Baatour Full Stack Developer Author of AFL |
![]() - - - |
![]() - - - |
![]() - - - |
Note: doors are open to join the AFL team!