functiongetNodeInjectable(lView, tView, index, tNode){let value = lView[index];const tData = tView.data;if(isFactory(value)){const factory = value;if(factory.resolving){thrownewError(`Circular dep for ${stringifyForError(tData[index])}`);}const previousIncludeViewProviders =setIncludeViewProviders(factory.canSeeViewProviders);factory.resolving =true;let previousInjectImplementation;if(factory.injectImpl){previousInjectImplementation =setInjectImplementation(factory.injectImpl);}enterDI(lView, tNode);try{value = lView[index]= factory.factory(undefined, tData, lView, tNode);// This code path is hit for both directives and providers.// For perf reasons, we want to avoid searching for hooks on providers.// It does no harm to try (the hooks just won't exist), but the extra// checks are unnecessary and this is a hot path. So we check to see// if the index of the dependency is in the directive range for this// tNode. If it's not, we know it's a provider and skip hook registration.if(tView.firstCreatePass && index >= tNode.directiveStart){ngDevMode &&assertDirectiveDef(tData[index]);registerPreOrderHooks(index, tData[index], tView);}}finally{if(factory.injectImpl)setInjectImplementation(previousInjectImplementation);setIncludeViewProviders(previousIncludeViewProviders);factory.resolving =false;leaveDI();}}return value;}