refactor(ivy): rename componentRefresh to directiveRefresh (#22395)

PR Close #22395
This commit is contained in:
Marc Laval
2018-02-23 11:02:38 +01:00
committed by Victor Berchet
parent a81d599bfc
commit aad431642a
14 changed files with 214 additions and 213 deletions

View File

@ -39,7 +39,7 @@ export {
interpolation8 as i8,
interpolationV as iV,
componentRefresh as r,
directiveRefresh as r,
container as C,
containerRefreshStart as cR,

View File

@ -372,7 +372,7 @@ export function renderComponentOrTemplate<T>(
} else {
// Element was stored at 0 and directive was stored at 1 in renderComponent
// so to refresh the component, refresh() needs to be called with (1, 0)
componentRefresh(1, 0);
directiveRefresh(1, 0);
}
} finally {
if (rendererFactory.end) {
@ -1208,14 +1208,15 @@ export function embeddedViewEnd(): void {
/////////////
/**
* Refreshes the component view.
* Refreshes the directive, triggering init and content hooks.
*
* In other words, enters the component's view and processes it to update bindings, queries, etc.
* When it is a component, it also enters the component's view and processes it to update bindings,
* queries, etc.
*
* @param directiveIndex
* @param elementIndex
*/
export function componentRefresh<T>(directiveIndex: number, elementIndex: number): void {
export function directiveRefresh<T>(directiveIndex: number, elementIndex: number): void {
executeInitHooks(currentView, currentView.tView, creationMode);
executeContentHooks(currentView, currentView.tView, creationMode);
const template = (tData[directiveIndex] as ComponentDef<T>).template;