mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): remove unused LifecycleHooksFeature (#59678)
LifecycleHooksFeature seems to be unused and can be deleted. PR Close #59678
This commit is contained in:
@@ -48,7 +48,6 @@ export {
|
||||
DirectiveType as ɵDirectiveType,
|
||||
getDirectives as ɵgetDirectives,
|
||||
getHostElement as ɵgetHostElement,
|
||||
LifecycleHooksFeature as ɵLifecycleHooksFeature,
|
||||
NgModuleFactory as ɵNgModuleFactory,
|
||||
NgModuleRef as ɵRender3NgModuleRef,
|
||||
NgModuleType as ɵNgModuleType,
|
||||
|
||||
@@ -521,22 +521,3 @@ function projectNodes(
|
||||
projection.push(nodesforSlot != null && nodesforSlot.length ? Array.from(nodesforSlot) : null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to enable lifecycle hooks on the root component.
|
||||
*
|
||||
* Include this feature when calling `renderComponent` if the root component
|
||||
* you are rendering has lifecycle hooks defined. Otherwise, the hooks won't
|
||||
* be called properly.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```ts
|
||||
* renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
|
||||
* ```
|
||||
*/
|
||||
export function LifecycleHooksFeature(): void {
|
||||
const tNode = getCurrentTNode()!;
|
||||
ngDevMode && assertDefined(tNode, 'TNode is required');
|
||||
registerPostOrderHooks(getLView()[TVIEW], tNode);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.dev/license
|
||||
*/
|
||||
import {LifecycleHooksFeature} from './component_ref';
|
||||
import {ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineNgModule, ɵɵdefinePipe} from './definition';
|
||||
import {ɵɵCopyDefinitionFeature} from './features/copy_definition_feature';
|
||||
import {ɵɵHostDirectivesFeature} from './features/host_directives_feature';
|
||||
@@ -235,7 +234,6 @@ export {
|
||||
getDirectives,
|
||||
getHostElement,
|
||||
getRenderedText,
|
||||
LifecycleHooksFeature,
|
||||
PipeDef,
|
||||
ɵɵComponentDeclaration,
|
||||
ɵɵCopyDefinitionFeature,
|
||||
|
||||
Reference in New Issue
Block a user