Skip to content

Commit 94aab12

Browse files
authored
Automatically add templating if version is at least 7
1 parent 3c0177b commit 94aab12

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/io/swagger/codegen/v3/generators/typescript/TypeScriptAngularClientCodegen.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ public void processOpts() {
152152
if (!ngVersion.atLeast("4.3.0")) {
153153
supportingFiles.add(new SupportingFile("rxjs-operators.mustache", getIndexDirectory(), "rxjs-operators.ts"));
154154
}
155+
156+
// Version after Angular 10 require ModuleWithProviders to be generic. Compatible from version 7.
157+
if (ngVersion.atLeast("7.0.0")) {
158+
additionalProperties.put("genericModuleWithProviders", true);
159+
}
155160

156161
// for Angular 2 AOT support we will use good-old ngc,
157162
// Angular Package format wasn't invented at this time and building was much more easier

0 commit comments

Comments
 (0)