Data is changing in service and component but it's not getting reflected on view.
Following are the solutions used which didn't solve the issue :
Used lifecycle hook ngDoCheck
Used angular zone and called method inside zone.run()
Invoked change detection manually by calling ChangeDetectorRef.detectChanges()
Added timer of 5 sec before calling the methods.
My code:
ngOnInit() {
this.noticeService.notices.subscribe(data => {
this.notices = data;
});
}
The issue is whenever I debug the code I found that data is reflected in notices variable of component but its not getting displayed on UI unless any user action like click is not performed. Your help is much appreciated.