---
lang: en
title: 'API docs: core.application.lifecycleobserver'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/core
permalink: /doc/en/lb4/apidocs.core.application.lifecycleobserver.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/core](./core.md) &gt; [Application](./core.application.md) &gt; [lifeCycleObserver](./core.application.lifecycleobserver.md)

## Application.lifeCycleObserver() method

Register a life cycle observer class

**Signature:**

```typescript
lifeCycleObserver<T extends LifeCycleObserver>(ctor: Constructor<T>, nameOrOptions?: string | BindingFromClassOptions): Binding<T>;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

ctor


</td><td>

[Constructor](./context.constructor.md)<!-- -->&lt;T&gt;


</td><td>

A class implements LifeCycleObserver


</td></tr>
<tr><td>

nameOrOptions


</td><td>

string \| [BindingFromClassOptions](./context.bindingfromclassoptions.md)


</td><td>

_(Optional)_ Optional name or options for the life cycle observer


</td></tr>
</tbody></table>
**Returns:**

[Binding](./context.binding.md)<!-- -->&lt;T&gt;


