I got error from ERROR TypeError: "_co.dashboard is undefined" when I try to call dashboard.all_interviewed in html.
In My dashboard.component.ts
dashboard: Dashboard;
getDashboard() {
this.dashboardService.getDashboard().subscribe(
res => {
this.dashboard = res;
}
)
}
In Dasboard Class
export class Dashboard {
all_interviewed: number;
}
dashboard.component.html
<h2>{{ dashboard.all_interviewed }} </h2>
I got this error in console log.
ERROR TypeError: "_co.dashboard is undefined" View_DashboardComponent_0 DashboardComponent.html:208 Angular 32 RxJS 5 Angular 8 DashboardComponent.html:203:11