# AngularFire
AngularFire smooths over the rough edges an Angular developer might encounter when implementing the framework-agnostic
[Firebase JS SDK](https://github.com/firebase/firebase-js-sdk) & aims to provide a more natural developer experience
by conforming to Angular conventions.
ng add @angular/fire
- **Dependency injection** - Provide and Inject Firebase services in your components.
- **Zone.js wrappers** - Stable zones allow proper functionality of service workers, forms, SSR, and pre-rendering.
- **Observable based** - Utilize RxJS rather than callbacks for real-time streams.
- **NgRx friendly API** - Integrate with NgRx using AngularFire's action based APIs.
- **Lazy-loading** - AngularFire dynamically imports much of Firebase, reducing the time to load your app.
- **Deploy schematics** - Get your Angular application deployed on Firebase Hosting with a single command.
- **Google Analytics** - Zero-effort Angular Router awareness in Google Analytics.
- **Router Guards** - Guard your Angular routes with built-in Firebase Authentication checks.
## Example use
```ts
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
import { getFirestore, provideFirestore } from '@angular/fire/firestore';
export const appConfig: ApplicationConfig = {
providers: [
provideFirebaseApp(() => initializeApp({ ... })),
provideFirestore(() => getFirestore()),
...
],
...
})
```
```ts
import { AsyncPipe } from '@angular/common';
import { inject } from '@angular/core';
import { Firestore, collectionData, collection } from '@angular/fire/firestore';
interface Item {
name: string,
...
};
@Component({
selector: 'app-root',
template: `
| #### [Analytics](docs/analytics.md#analytics) ```ts import { } from '@angular/fire/analytics'; ``` | #### [Authentication](docs/auth.md#authentication) ```ts import { } from '@angular/fire/auth'; ``` |
| #### [Cloud Firestore](docs/firestore.md#cloud-firestore) ```ts import { } from '@angular/fire/firestore'; ``` | #### [Cloud Functions](docs/functions.md#cloud-functions) ```ts import { } from '@angular/fire/functions'; ``` |
| #### [Cloud Messaging](docs/messaging.md#cloud-messaging) ```ts import { } from '@angular/fire/messaging'; ``` | #### [Cloud Storage](docs/storage.md#cloud-storage) ```ts import { } from '@angular/fire/storage'; ``` |
| #### [Performance Monitoring](docs/performance.md#performance-monitoring) ```ts import { } from '@angular/fire/performance'; ``` | #### [Realtime Database](docs/database.md#realtime-database) ```ts import { } from '@angular/fire/database'; ``` |
| #### [Remote Config](docs/remote-config.md#remote-config) ```ts import { } from '@angular/fire/remote-config'; ``` | #### [App Check](docs/app-check.md#app-check) ```ts import { } from '@angular/fire/app-check'; ``` |
| #### [Vertex AI](docs/vertexai.md#vertex-ai) ```ts import { } from '@angular/fire/vertexai'; ``` |