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

ng add fails with standalone application #1699

Open
RronKurtishi opened this issue Nov 28, 2023 · 2 comments
Open

ng add fails with standalone application #1699

RronKurtishi opened this issue Nov 28, 2023 · 2 comments

Comments

@RronKurtishi
Copy link

Describe the bug
ng add angular-calendar fails when trying to add module imports in Angular 17 as it is standalone by default.

For a standalone app, imports should be added inside the providers array in app.config.ts file using importProvidersFrom:

    importProvidersFrom(
      CalendarModule.forRoot({
        provide: DateAdapter,
        useFactory: adapterFactory,
      })
    )

Versions

  • @angular/core: ^17.0.0
  • angular-calendar: ^0.31.0
  • Browser name and version: all
@matts-bot
Copy link

matts-bot bot commented Nov 28, 2023

Thanks so much for opening an issue! If you'd like to support this project, then please consider sponsoring me

@sambyte61
Copy link

@RronKurtishi I was struggling with this same issue for a while. Your solution works for me too.

Also worth noting that you need to import importProvidersFrom from @angular/core.

import { importProvidersFrom } from '@angular/core';

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

No branches or pull requests

2 participants