Page Contents

Home > @loopback/core > Application > lifeCycleObserver

Application.lifeCycleObserver() method

Register a life cycle observer class

Signature:

lifeCycleObserver<T extends LifeCycleObserver>(ctor: Constructor<T>, name?: string): Binding<T>;

Parameters

Parameter Type Description
ctor Constructor<T> A class implements LifeCycleObserver
name string Optional name for the life cycle observer

Returns:

Binding<T>