core.js:6162 ERROR Error: NG0100:
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.
Previous value: 'null'. Current value: '{
When attempting to retrieve the
{{dispositionDetails?.metricsData | json}}
, I encountered the mentioned error.
Any suggestions on how to resolve this issue? The dispositionDetails
is sourced from the tag #dispositionDetails
as indicated in the code below. Any insights would be appreciated.
#ts code
export class DealDetailsComponent implements OnInit {
@ViewChild('pmrDetails') pmrDetails: any;
@ViewChild('dispositionDetails') dispositionDetails: any;
#html code
<div class="page-content-details" *ngIf="urlData">
<div class="page-content-details-left">
<div>
<app-deal-pmr #pmrDetails
*ngIf="urlData.dealType === 'Portfolio Management Restructure'"
(gotoManageDealsEvent)="goBack()"
(setIsInEditMode)="setIsInEditMode($event)"
[dealData]="dealDetails"
[transactionData]="urlData.transaction"
[leaseDetails]="leaseDetails">
</app-deal-pmr>
<app-deal-idle-disposition #dispositionDetails
*ngIf="urlData.dealType === 'Idle Disposition'"
(gotoManageDealsEvent)="goBack()"
(setIsInEditMode)="setIsInEditMode($event)"
[dealData]="dealDetails"
[transactionData]="urlData.transaction"
[leaseDetails]="leaseDetails">
</app-deal-idle-disposition>
<app-deal-partnership
*ngIf="urlData.dealType === 'Partnership'"
(gotoManageDealsEvent)="goBack()"
[dealData]="dealDetails"
[transactionData]="urlData.transaction"
[leaseDetails]="leaseDetails">
</app-deal-partnership>
</div>
<app-page-section-cards [header]="pageSectionsOptions.checkList">
<div sectionContent>
</div>
</app-page-section-cards>
{{dispositionDetails?.metricsData | json}}
<app-page-section-cards [header]="pageSectionsOptions.metrics">
<div sectionContent>
<app-deal-metrics
*ngIf="!isInEditMode"
[isInEditMode]="isInEditMode"
[dealData]="dealDetails"
[dealType]="urlData.dealType">
</app-deal-metrics>
<app-deal-metrics
*ngIf="isInEditMode"
[isInEditMode]="isInEditMode"
[editData]="pmrDetails?.metricsData || dispositionDetails?.metricsData"
[dealType]="urlData.dealType">
</app-deal-metrics>
</div>
</app-page-section-cards>
</div>