Skip to content

Migrate HttpClientModule to provideHttpClient with ng g @angular/core:standalone #48948

@cexbrayat

Description

@cexbrayat

Which @angular/* package(s) are relevant/related to the feature request?

core

Description

Currently, a module importing HttpClientModule is migrated to importProvidersFrom(HttpClientModule).

Proposed solution

It would be nice to migrate it to provideHttpClient(), and, ideally, to add withInterceptorsFromDi() if class-based interceptors are registered

Alternatives considered

Manually migrate the importProvidersFrom(HttpClientModule) to provideHttpClient()

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: common/httpIssues related to HTTP and HTTP Clientarea: migrationsIssues related to `ng update`/`ng generate` migrationscross-cutting: standaloneIssues related to the NgModule-less world

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions