Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bc926a8

Browse files
authoredDec 14, 2024
Single n19 sample (#3591)
1 parent 45ccd39 commit bc926a8

File tree

267 files changed

+20439
-41931
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+20439
-41931
lines changed
 

‎README.md

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ export const appConfig: ApplicationConfig = {
3333
```
3434

3535
```ts
36+
import { AsyncPipe } from '@angular/common';
3637
import { inject } from '@angular/core';
3738
import { Firestore, collectionData, collection } from '@angular/fire/firestore';
38-
import { Observable } from 'rxjs';
3939

4040
interface Item {
4141
name: string,
@@ -44,7 +44,6 @@ interface Item {
4444

4545
@Component({
4646
selector: 'app-root',
47-
standalone: true,
4847
template: `
4948
<ul>
5049
@for (item of (item$ | async); track item) {
@@ -53,30 +52,16 @@ interface Item {
5352
</li>
5453
}
5554
</ul>
56-
`
55+
`,
56+
imports: [AsyncPipe]
5757
})
5858
export class AppComponent {
59-
item$: Observable<Item[]>;
60-
firestore: Firestore = inject(Firestore);
61-
62-
constructor() {
63-
const itemCollection = collection(this.firestore, 'items');
64-
this.item$ = collectionData<Item>(itemCollection);
65-
}
59+
firestore = inject(Firestore);
60+
itemCollection = collection(this.firestore, 'items');
61+
item$ = collectionData<Item>(itemCollection);
6662
}
6763
```
6864

69-
### Polyfills
70-
71-
Neither AngularFire nor Firebase ship with polyfills. To have compatibility across a wide-range of environments, we suggest the following polyfills be added to your application:
72-
73-
| API | Environments | Suggested Polyfill | License |
74-
|-----|--------------|--------------------|---------|
75-
| Various ES5+ features | Safari &lt; 10 | [`core-js/stable`](https://github.com/zloirock/core-js#readme) | MIT |
76-
| `globalThis` | [Chrome &lt; 71<br>Safari &lt; 12.1<br>iOS &lt; 12.2<br>Node &lt; 12](https://caniuse.com/mdn-javascript_builtins_globalthis) | [`globalThis`](https://github.com/es-shims/globalThis#readme) | MIT |
77-
| `Proxy` | [Safari &lt; 10](https://caniuse.com/proxy) | [`proxy-polyfill`](https://github.com/GoogleChrome/proxy-polyfill#readme) | Apache 2.0 |
78-
| `fetch` | [Safari &lt; 10.1<br>iOS &lt; 10.3](https://caniuse.com/fetch) | [`cross-fetch`](https://github.com/lquixada/cross-fetch#readme) | MIT |
79-
8065
## Resources
8166

8267
[Quickstart](docs/install-and-setup.md) - Get your first application up and running by following our quickstart guide.
@@ -85,15 +70,11 @@ Neither AngularFire nor Firebase ship with polyfills. To have compatibility acro
8570

8671
[Stackblitz Template](https://stackblitz.com/edit/angular-fire-start) - Remember to set your Firebase configuration in `app/app.module.ts`.
8772

88-
[Upgrading to v7.0? Check out our guide.](docs/version-7-upgrade.md)
89-
90-
### Sample apps
73+
[Upgrading from v6.0? Check out our guide.](docs/version-7-upgrade.md)
9174

92-
We have three sample apps in this repository:
75+
### Sample app
9376

94-
1. [`samples/compat`](samples/compat) a kitchen sink application that demonstrates use of the "compatibility" API
95-
1. [`samples/modular`](samples/modular) a kitchen sink application that demonstrates the new tree-shakable API
96-
1. [`samples/advanced`](samples/advanced) the same app as `samples/modular` but demonstrates more advanced concepts such as Angular Universal state-transfer, dynamically importing Firebase feature modules, and Firestore data bundling.
77+
The [`sample`](sample) 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.
9778

9879
### Having troubles?
9980

‎samples/advanced/.editorconfig renamed to ‎sample/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ trim_trailing_whitespace = true
1010

1111
[*.ts]
1212
quote_type = single
13+
ij_typescript_use_double_quotes = false
1314

1415
[*.md]
1516
max_line_length = off

0 commit comments

Comments
 (0)