Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 18 build errors in AngularFire Quickstart #3571

Closed
DellaBitta opened this issue Oct 23, 2024 · 1 comment · Fixed by #3570
Closed

Angular 18 build errors in AngularFire Quickstart #3571

DellaBitta opened this issue Oct 23, 2024 · 1 comment · Fixed by #3570

Comments

@DellaBitta
Copy link
Contributor

The current example for getting started with AngularFire uses directives that have changed in Angular 18. Users creating a new Angular app from scratch using ng new and the AngularFire Quickstart will encounter numerous compilation errors. Such as:

NG8004: No pipe found with name 'async'. [plugin angular-compiler]

    src/app/app.component.html:235:54:
      235 │         <li class="text" *ngFor="let item of items$ | async">
          ╵                                                       ~~~~~

  Error occurs in the template of component AppComponent.

    src/app/app.component.ts:19:15:
      19 │   templateUrl: './app.component.html',
         ╵                ~~~~~~~~~~~~~~~~~~~~~~

Additionally, the example code should be updated to use the new @for directive instead of the older @ngFor. @for was introduced in Angular 17, and it looks like when that happened Anguar forced apps to explicitly import ngFor in their app components, but the example hasn't been updated to do that.

Therefore, the recommend changes are to:

  • Update the example code for app.component.html to replace the usage of @ngFor with @for.
  • Fix the imports for app.component.ts in the 3. Inject Firestore`` and ### 4. Bind a Firestore collection to a list steps.
@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants