Skip to content

[typescript-angular] generated package/ApiModule imports HttpModule but should import HttpClientModule instead #6727

@JohannesHoppe

Description

@JohannesHoppe
Description

Latest templates for Angular 2+ use HttpClient instead of Http. Which is great. But the import is still referencing the wrong module, which makes the import useless:

// OLD
import { HttpModule } from '@angular/http'

@NgModule({
  imports:      [ CommonModule, HttpModule ],
}

should be:

// NEW
import { HttpClientModule } from '@angular/common/http';

@NgModule({
  imports:      [ CommonModule, HttpClientModule ],
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions