From 91ba4944ee108258e7e70e6a3d80d86a08c43988 Mon Sep 17 00:00:00 2001 From: elinuxhenrik Date: Mon, 8 Mar 2021 14:15:36 +0100 Subject: [PATCH] Remove errors after adding stricter checks After seeting the Angular compiler options "strictTemplates" and "fullTemplateTypeCheck" to true, some new compiler errors showed up. These are corrected in this commit. Change-Id: Ieb432865756d91fc8bcb0b7d2e724f58ec54b382 Signed-off-by: elinuxhenrik Issue-ID: NONRTRIC-460 --- .../no-type-policy-instance-dialog.component.html | 2 +- .../no-type-policy-instance-dialog.component.spec.ts | 4 ++++ .../policy-instance-dialog/policy-instance-dialog.component.html | 4 ++-- webapp-frontend/tsconfig.json | 6 +++++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/webapp-frontend/src/app/policy/no-type-policy-instance-dialog/no-type-policy-instance-dialog.component.html b/webapp-frontend/src/app/policy/no-type-policy-instance-dialog/no-type-policy-instance-dialog.component.html index df45cc2..afba575 100644 --- a/webapp-frontend/src/app/policy/no-type-policy-instance-dialog/no-type-policy-instance-dialog.component.html +++ b/webapp-frontend/src/app/policy/no-type-policy-instance-dialog/no-type-policy-instance-dialog.component.html @@ -37,7 +37,7 @@ fxLayoutAlign.lt-sm="flex-start center"> - +

Properties

diff --git a/webapp-frontend/src/app/policy/no-type-policy-instance-dialog/no-type-policy-instance-dialog.component.spec.ts b/webapp-frontend/src/app/policy/no-type-policy-instance-dialog/no-type-policy-instance-dialog.component.spec.ts index 0c3853d..fc07a5b 100644 --- a/webapp-frontend/src/app/policy/no-type-policy-instance-dialog/no-type-policy-instance-dialog.component.spec.ts +++ b/webapp-frontend/src/app/policy/no-type-policy-instance-dialog/no-type-policy-instance-dialog.component.spec.ts @@ -34,6 +34,7 @@ import { PolicyService } from "../../services/policy/policy.service"; import { ErrorDialogService } from "../../services/ui/error-dialog.service"; import { UiService } from "../../services/ui/ui.service"; import { NoTypePolicyInstanceDialogComponent } from "./no-type-policy-instance-dialog.component"; +import { CUSTOM_ELEMENTS_SCHEMA } from "@angular/core"; describe('NoTypePolicyInstanceDialogComponent', () => { let component: NoTypePolicyInstanceDialogComponent; @@ -56,6 +57,9 @@ describe('NoTypePolicyInstanceDialogComponent', () => { ReactiveFormsModule, ToastrModule.forRoot() ], + schemas: [ + CUSTOM_ELEMENTS_SCHEMA + ], declarations: [ NoTypePolicyInstanceDialogComponent ], diff --git a/webapp-frontend/src/app/policy/policy-instance-dialog/policy-instance-dialog.component.html b/webapp-frontend/src/app/policy/policy-instance-dialog/policy-instance-dialog.component.html index 76a9ae0..2d0526e 100644 --- a/webapp-frontend/src/app/policy/policy-instance-dialog/policy-instance-dialog.component.html +++ b/webapp-frontend/src/app/policy/policy-instance-dialog/policy-instance-dialog.component.html @@ -63,9 +63,9 @@
{{jsonFormStatusMessage}}
-
diff --git a/webapp-frontend/tsconfig.json b/webapp-frontend/tsconfig.json index 5a33131..5931c27 100644 --- a/webapp-frontend/tsconfig.json +++ b/webapp-frontend/tsconfig.json @@ -20,5 +20,9 @@ "es2018", "dom" ] - } + }, + "angularCompilerOptions": { + "strictTemplates": true, + "fullTemplateTypeCheck": true + } } -- 2.16.6