refactor(ivy): pass host into createLView explicitly (#28461)
`LView` `HOST` was set in most cases right after creating `LView`. This makes the API cleaner by explicitly passing it ont `createLView`. PR Close #28461
This commit is contained in:

committed by
Matias Niemelä

parent
22d3226491
commit
62a13e795a
@ -13,7 +13,7 @@ import {EmbeddedViewRef as viewEngine_EmbeddedViewRef, InternalViewRef as viewEn
|
||||
|
||||
import {checkNoChanges, checkNoChangesInRootView, checkView, detectChangesInRootView, detectChangesInternal, markViewDirty, storeCleanupFn, viewAttached} from './instructions';
|
||||
import {TNode, TNodeType, TViewNode} from './interfaces/node';
|
||||
import {FLAGS, HOST, HOST_NODE, LView, LViewFlags, PARENT, RENDERER_FACTORY} from './interfaces/view';
|
||||
import {FLAGS, HOST, LView, LViewFlags, PARENT, RENDERER_FACTORY, T_HOST} from './interfaces/view';
|
||||
import {destroyLView} from './node_manipulation';
|
||||
import {getNativeByTNode} from './util';
|
||||
|
||||
@ -41,7 +41,7 @@ export class ViewRef<T> implements viewEngine_EmbeddedViewRef<T>, viewEngine_Int
|
||||
|
||||
get rootNodes(): any[] {
|
||||
if (this._lView[HOST] == null) {
|
||||
const tView = this._lView[HOST_NODE] as TViewNode;
|
||||
const tView = this._lView[T_HOST] as TViewNode;
|
||||
return collectNativeNodes(this._lView, tView, []);
|
||||
}
|
||||
return [];
|
||||
|
Reference in New Issue
Block a user