From 4ef3ee778fc944cdfe28146d4eed360ce096e5ee Mon Sep 17 00:00:00 2001 From: Yoav Schneiderman Date: Wed, 8 Jan 2020 14:46:14 +0200 Subject: Upgrade to Angular 8 Issue-ID: VID-742 Change-Id: Ic4b3aae71d4c946e23d854847a49aa7e020c465d Signed-off-by: Yoav Schneiderman --- .../src/app/vlanTagging/form-async/form-async.component.ts | 2 +- .../network-selector/network-selector.component.ts | 2 +- .../src/app/vlanTagging/vlan-tagging.component.ts | 11 ++++------- 3 files changed, 6 insertions(+), 9 deletions(-) (limited to 'vid-webpack-master/src/app/vlanTagging') diff --git a/vid-webpack-master/src/app/vlanTagging/form-async/form-async.component.ts b/vid-webpack-master/src/app/vlanTagging/form-async/form-async.component.ts index 623a4f42f..aa381684c 100644 --- a/vid-webpack-master/src/app/vlanTagging/form-async/form-async.component.ts +++ b/vid-webpack-master/src/app/vlanTagging/form-async/form-async.component.ts @@ -27,7 +27,7 @@ export class Formasync implements OnInit { constructor(private store: NgRedux, private _formAsyncService: FormAsyncService) { } - @ViewChild('form') form: NgForm; + @ViewChild('form', {static: false}) form: NgForm; @Input() set params(params: any) { if (params) { diff --git a/vid-webpack-master/src/app/vlanTagging/network-selector/network-selector.component.ts b/vid-webpack-master/src/app/vlanTagging/network-selector/network-selector.component.ts index c0aeb0b51..b7961ea38 100644 --- a/vid-webpack-master/src/app/vlanTagging/network-selector/network-selector.component.ts +++ b/vid-webpack-master/src/app/vlanTagging/network-selector/network-selector.component.ts @@ -21,7 +21,7 @@ export class NetworkSelectorComponent implements OnInit { @select(['service', 'networkFunctions']) readonly networkFunctions: Observable; - @ViewChild('form') form: NgForm; + @ViewChild('form', {static: false}) form: NgForm; constructor(store: NgRedux) { this.localStore = store; diff --git a/vid-webpack-master/src/app/vlanTagging/vlan-tagging.component.ts b/vid-webpack-master/src/app/vlanTagging/vlan-tagging.component.ts index 87f117202..43e14e922 100644 --- a/vid-webpack-master/src/app/vlanTagging/vlan-tagging.component.ts +++ b/vid-webpack-master/src/app/vlanTagging/vlan-tagging.component.ts @@ -71,11 +71,8 @@ export class VlanTaggingComponent implements OnInit { readonly userIdObs: Observable; - @ViewChild(NetworkSelectorComponent) - public networkSelectorComponent: NetworkSelectorComponent; - @ViewChild(Formasync) - public formAsync: Formasync; - + @ViewChild(NetworkSelectorComponent, {static: false}) networkSelectorComponent: NetworkSelectorComponent; + @ViewChild(Formasync, {static: false}) formAsync: Formasync; deploySubInterface() { @@ -186,9 +183,9 @@ export class VlanTaggingComponent implements OnInit { isNextButtonDisabled() { switch (this.currentStep) { case WizardSteps.one: - return !this.formAsync.form.valid; + return this.formAsync ? !this.formAsync.form.valid : false; case WizardSteps.two: - return !this.networkSelectorComponent.form.valid; + return this.networkSelectorComponent ? !this.networkSelectorComponent.form.valid : false; } } -- cgit 1.2.3-korg