fix(ivy): support checkNoChanges on embedded views (#28644)
Before this fix our ViewRef implementation assumed that checkNoChanges can be only called on component views. In reality checkNoChanges can be also called on embedded views (ex.: when an embedded view is attached to ApplicationRef). PR Close #28644
This commit is contained in:

committed by
Miško Hevery

parent
2bf0d1a56f
commit
e5861e1c79
@ -11,9 +11,9 @@ import {ChangeDetectorRef as viewEngine_ChangeDetectorRef} from '../change_detec
|
||||
import {ViewContainerRef as viewEngine_ViewContainerRef} from '../linker/view_container_ref';
|
||||
import {EmbeddedViewRef as viewEngine_EmbeddedViewRef, InternalViewRef as viewEngine_InternalViewRef} from '../linker/view_ref';
|
||||
|
||||
import {checkNoChanges, checkNoChangesInRootView, checkView, detectChangesInRootView, detectChangesInternal, markViewDirty, storeCleanupFn, viewAttached} from './instructions';
|
||||
import {checkNoChangesInRootView, checkNoChangesInternal, detectChangesInRootView, detectChangesInternal, markViewDirty, storeCleanupFn} from './instructions';
|
||||
import {TNode, TNodeType, TViewNode} from './interfaces/node';
|
||||
import {FLAGS, HOST, LView, LViewFlags, PARENT, RENDERER_FACTORY, T_HOST} from './interfaces/view';
|
||||
import {FLAGS, HOST, LView, LViewFlags, PARENT, T_HOST} from './interfaces/view';
|
||||
import {destroyLView} from './node_manipulation';
|
||||
import {getNativeByTNode} from './util';
|
||||
|
||||
@ -252,7 +252,7 @@ export class ViewRef<T> implements viewEngine_EmbeddedViewRef<T>, viewEngine_Int
|
||||
* This is used in development mode to verify that running change detection doesn't
|
||||
* introduce other changes.
|
||||
*/
|
||||
checkNoChanges(): void { checkNoChanges(this.context); }
|
||||
checkNoChanges(): void { checkNoChangesInternal(this._lView, this.context); }
|
||||
|
||||
attachToViewContainerRef(vcRef: viewEngine_ViewContainerRef) {
|
||||
if (this._appRef) {
|
||||
|
Reference in New Issue
Block a user