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:
|
imports: [ CommonModule, HttpModule ], |
// OLD
import { HttpModule } from '@angular/http'
@NgModule({
imports: [ CommonModule, HttpModule ],
}
should be:
// NEW
import { HttpClientModule } from '@angular/common/http';
@NgModule({
imports: [ CommonModule, HttpClientModule ],
}
Description
Latest templates for Angular 2+ use
HttpClientinstead ofHttp. Which is great. But the import is still referencing the wrong module, which makes the import useless:swagger-codegen/modules/swagger-codegen/src/main/resources/typescript-angular/api.module.mustache
Line 13 in e4abddf
should be: