# Dialog Events

The Kendo UI for Angular Dialog emits a number of events which enable you to control its behavior upon user interaction.

To close the Dialog in the [`close`](https://www.telerik.com/kendo-angular-ui/components/dialogs/api/dialogcomponent#close) event handler, update the state that controls its rendering. While focus is on the Dialog wrapper, the titlebar **Close** button, or an action button, the Dialog emits the `close` event on `Esc`.

The buttons you place inside the [`kendo-dialog-actions`](https://www.telerik.com/kendo-angular-ui/components/dialogs/api/dialogactionscomponent) component have their own `click` handlers and do not emit `close`.

The following example handles `close` and the click of an action button.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/dialogs/dialog/events/source.txt)

The Dialog also emits the [`action`](https://www.telerik.com/kendo-angular-ui/components/dialogs/api/dialogcomponent#action) event when the user clicks a button defined by its [`actions`](https://www.telerik.com/kendo-angular-ui/components/dialogs/api/dialogcomponent#actions) collection. The event value is the selected [`DialogAction`](https://www.telerik.com/kendo-angular-ui/components/dialogs/api/dialogaction). Buttons inside `kendo-dialog-actions` do not trigger this event.

The following example updates the status when a user selects an action from the collection or closes the Dialog.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/dialogs/dialog/events/action-buttons/source.txt)

## Suggested Links

* [API Reference of the Dialog](https://www.telerik.com/kendo-angular-ui/components/dialogs/api/dialogcomponent)
