Interface ComponentLifecycleHooks<ServiceType>

Methods (hooks) called by the app runtime during the lifecycle of a component.

interface ComponentLifecycleHooks<ServiceType> {
    activate?(context): void | Promise<void>;
    deactivate?(context): void | Promise<void>;
    destroy?(): void | Promise<void>;
    init?(context): void;
    modified?(context): boolean | void;
}

Type Parameters

Methods

  • Signals the end of the injection phase and that the component instance is ready for use. The app runtime guarantees that service consumers can access the component instance only after activate is called on the instance.

    Parameters

    Returns void | Promise<void>

  • Signals the start of the shutdown process of the component instance. All injected services are still available and the ejection phase starts after this method.

    Parameters

    Returns void | Promise<void>

  • Signals the end of the life of the component instance. All services are ejected before this method.

    Returns void | Promise<void>

  • Signals the start of the injection phase of the component. It is the first method called by the app runtime after the construction of the instance. Services are injected after this method is called.

    Parameters

    Returns void

  • Signals that the component properties(configuration) are changed. This method is only called between activate and deactivate.

    Parameters

    Returns boolean | void

Generated using TypeDoc