refactor(ivy): remove directiveRefresh instruction (#22745)

PR Close #22745
This commit is contained in:
Kara Erickson
2018-03-13 11:48:09 -07:00
parent 4ac606b419
commit b1365d1fa8
28 changed files with 157 additions and 313 deletions

View File

@ -97,20 +97,7 @@ function queueDestroyHooks(def: DirectiveDef<any>, tView: TView, i: number): voi
export function executeInitHooks(currentView: LView, tView: TView, creationMode: boolean): void {
if (currentView.lifecycleStage === LifecycleStage.INIT) {
executeHooks(currentView.data, tView.initHooks, tView.checkHooks, creationMode);
currentView.lifecycleStage = LifecycleStage.CONTENT_INIT;
}
}
/**
* Calls all afterContentInit and afterContentChecked hooks for the view, then splices
* out afterContentInit hooks to prep for the next run in update mode.
*
* @param currentView The current view
*/
export function executeContentHooks(currentView: LView, tView: TView, creationMode: boolean): void {
if (currentView.lifecycleStage < LifecycleStage.VIEW_INIT) {
executeHooks(currentView.data, tView.contentHooks, tView.contentCheckHooks, creationMode);
currentView.lifecycleStage = LifecycleStage.VIEW_INIT;
currentView.lifecycleStage = LifecycleStage.AFTER_INIT;
}
}