I am getting Cannot read property of undefined in angular 6 but its value is displaying in template.here is my code
this.data.post_data('dashboard/gettodaydata','',true)
.subscribe((data:any) => {
this.today_datas =data.data;
});
and this is my template file
<span class="counter text-danger">{{ today_datas.total_cpc | number }}</span>