Skip to content

Commit

Permalink
fix: browser console ExpressionChanged error
Browse files Browse the repository at this point in the history
  • Loading branch information
saffaalvi committed Sep 24, 2020
1 parent faf5415 commit d2a9537
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frontend/src/app/resource-form/resource-form.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit, OnDestroy } from "@angular/core";
import { Component, OnInit, AfterContentChecked, OnDestroy, ChangeDetectorRef } from "@angular/core";
import { FormGroup } from "@angular/forms";
import { NamespaceService } from "../services/namespace.service";
import { KubernetesService } from "../services/kubernetes.service";
Expand Down Expand Up @@ -30,7 +30,8 @@ export class ResourceFormComponent implements OnInit, OnDestroy {
private namespaceService: NamespaceService,
private k8s: KubernetesService,
private router: Router,
private popup: SnackBarService
private popup: SnackBarService,
private cdr: ChangeDetectorRef
) {}

ngOnInit() {
Expand Down Expand Up @@ -76,6 +77,10 @@ export class ResourceFormComponent implements OnInit, OnDestroy {
}
});
}

ngAfterContentChecked() {
this.cdr.detectChanges();
}

ngOnDestroy() {
// Unsubscriptions
Expand Down

0 comments on commit d2a9537

Please sign in to comment.