refactor(ivy): simplify walkTNodeTree method for readability (#31182)

PR Close #31182
This commit is contained in:
Misko Hevery
2019-06-07 20:46:11 -07:00
committed by Kara Erickson
parent 7186f9c016
commit 29a9909232
7 changed files with 342 additions and 195 deletions

View File

@ -42,7 +42,12 @@ export function getRootView(componentOrLView: LView | {}): LView {
}
/**
* Given a current view, finds the nearest component's host (LElement).
* Given an `LView`, find the closest declaration view which is not an embedded view.
*
* This method searches for the `LView` associated with the component which declared the `LView`.
*
* This function may return itself if the `LView` passed in is not an embedded `LView`. Otherwise
* it walks the declaration parents until it finds a component view (non-embedded-view.)
*
* @param lView LView for which we want a host element node
* @returns The host node