angularangular-materialangular-upgradeangular-errorhandlerangular11

ASSERTION ERROR: This TNode does not belong to this TView. after angular update from v7.1 to v11


I have updated the angular app from v7.1 to v11, Updation was successful but after the update getting the below error.

ERROR Error: ASSERTION ERROR: This TNode does not belong to this TView. [Expected=> [object Object] == [object Object] <=Actual]
    at throwError (vendor.js:87491) [angular]
    at assertEqual (vendor.js:87432) [angular]
    at assertTNodeForTView (vendor.js:88968) [angular]
    at assertTNodeForLView (vendor.js:88963) [angular]
    at getNativeByTNode (vendor.js:89729) [angular]
    at getInsertInFrontOfRNodeWithNoI18n (vendor.js:94691) [angular]
    at getInsertInFrontOfRNode (vendor.js:94670) [angular]
    at appendChild (vendor.js:94730) [angular]
    at createContainerRef (vendor.js:99694) [angular]
    at createSpecialToken (vendor.js:118439) [angular]
    at createResultForNode (vendor.js:118421) [angular]
    at materializeViewResults (vendor.js:118470) [angular]
    at collectQueryResults (vendor.js:118490) [angular]
    at collectQueryResults (vendor.js:118517) [angular]

Solution

  • After removing #matrow from the dynamic-table component resolved the error. I have referred to the below answer to solve the issue.

    https://github.com/angular/angular/issues/39779#issuecomment-731745128