Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Angular + Firebase = ❤️

License

NotificationsYou must be signed in to change notification settings

angular/angularfire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AngularFire smooths over the rough edges an Angular developer might encounter when implementing the framework-agnosticFirebase JS SDK & aims to provide a more natural developer experienceby 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

import{provideFirebaseApp,initializeApp}from'@angular/fire/app';import{getFirestore,provideFirestore}from'@angular/fire/firestore';exportconstappConfig:ApplicationConfig={providers:[provideFirebaseApp(()=>initializeApp({ ...})),provideFirestore(()=>getFirestore()),    ...],  ...})
import{AsyncPipe}from'@angular/common';import{inject}from'@angular/core';import{Firestore,collectionData,collection}from'@angular/fire/firestore';interfaceItem{name:string,  ...};@Component({selector:'app-root',template:`  <ul>    @for (item of (item$ | async); track item) {      <li>        {{ item.name }}      </li>    }  </ul>  `,imports:[AsyncPipe]})exportclassAppComponent{firestore=inject(Firestore);itemCollection=collection(this.firestore,'items');item$=collectionData<Item>(itemCollection);}

Resources

Quickstart - Get your first application up and running by following our quickstart guide.

Contributing

Stackblitz Template - Remember to set your Firebase configuration inapp/app.module.ts.

Upgrading from v6.0? Check out our guide.

Sample app

Thesample folder contains a kitchen sink application that demonstrates use of the "modular" API, in a zoneless server-rendered application, with all the bells and whistles.

Having troubles?

Get help on ourQ&A board, the officialFirebase Mailing List, theFirebase Community Slack (#angularfire2), theAngular Community Discord (#firebase),Gitter, theFirebase subreddit, orStack Overflow.

NOTE: While relatively stable, AngularFire is adeveloper preview and is subject to change before general availability. Questions on the mailing list and issues filed here are answered on abest-effort basis by maintainers and other community members. If you are able to reproduce a problem with Firebaseoutside of AngularFire's implementation, pleasefile an issue on the Firebase JS SDK or reach out to the personalizedFirebase support channel.

Developer Guide

This developer guide assumes you're using the new tree-shakable AngularFire API,if you're looking for the compatibility API you can find the documentation here.

See the v7 upgrade guide for more information on this change..

Firebase product integrations

import{}from'@angular/fire/analytics';
import{}from'@angular/fire/auth';
import{}from'@angular/fire/firestore';
import{}from'@angular/fire/functions';
import{}from'@angular/fire/messaging';
import{}from'@angular/fire/storage';
import{}from'@angular/fire/performance';
import{}from'@angular/fire/database';
import{}from'@angular/fire/remote-config';
import{}from'@angular/fire/app-check';
import{}from'@angular/fire/vertexai';

[8]ページ先頭

©2009-2025 Movatter.jp