在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):angular/angularfire开源软件地址(OpenSource Url):https://github.com/angular/angularfire开源编程语言(OpenSource Language):TypeScript 90.3%开源软件介绍(OpenSource Introduction):AngularFireThe official Angular library for Firebase. ng add @angular/fire AngularFire smooths over the rough edges an Angular developer might encounter when implementing the framework-agnostic Firebase JS SDK & aims to provide a more natural developer experience by conforming to Angular conventions.
Example useimport { provideFirebaseApp, getApp, initializeApp } from '@angular/fire/app';
import { getFirestore, provideFirestore } from '@angular/fire/firestore';
@NgModule({
imports: [
provideFirebaseApp(() => initializeApp({ ... })),
provideFirestore(() => getFirestore()),
],
...
})
export class AppModule { } import { Firestore, collectionData, collection } from '@angular/fire/firestore';
import { Observable } from 'rxjs';
interface Item {
name: string,
...
};
@Component({
selector: 'app-root',
template: `
<ul>
<li *ngFor="let item of item$ | async">
{{ item.name }}
</li>
</ul>
`
})
export class AppComponent {
item$: Observable<Item[]>;
constructor(firestore: Firestore) {
const collection = collection(firestore, 'items');
this.item$ = collectionData(collection);
}
} CompatibilityAngular and Firebase versionsAngularFire doesn't follow Angular's versioning as Firebase also has breaking changes throughout the year. Instead we try to maintain compatibility with both Firebase and Angular majors for as long as possible, only breaking when we need to support a new major of one or the other.
Version combinations not documented here may work but are untested and you will see NPM peer warnings. PolyfillsNeither AngularFire or Firebase ship with polyfills. To have compatability across as wide-range of environments we suggest the following polyfills be added to your application:
ResourcesQuickstart - Get your first application up and running by following our quickstart guide. Stackblitz Template - Remember to set your Firebase configuration in Upgrading to v7.0? Check out our guide. Sample appsWe have three sample apps in this repository:
Having troubles?Get help on our Q&A board, the official Firebase Mailing List, the Firebase Community Slack (
Developer GuideAngularFire has a new tree-shakable API, however this is still under active development and documentation is in the works, so we suggest most developers stick with the Compatiability API for the time being. See the v7 upgrade guide for more information.. This developer guide assumes you're using the Compatiability API ( Monitor usage of your application in production
Interacting with your database(s)Firebase offers two cloud-based, client-accessible database solutions that support realtime data syncing. Learn about the differences between them in the Firebase Documentation. Cloud Firestore
Realtime Database
Authenticate usersLocal Emulator SuiteUpload filesReceive push notificationsBETA: Change behavior and appearance of your application without deploying
Monitor your application performance in production
Directly call Cloud FunctionsDeploying your application
Server-side rendering
Ionic |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论