Angular 10 (blur) Event Read Courses Improve Improve Improve Like Article Like Save Article Save Report issue Report In this article, we are going to see what is blur event in Angular 10 and how to use it. The blur event is triggered when an element loses its focus. Syntax: <input (blur)='functionName()'/> NgModule: Module used by blur event is: CommonModule Approach: Create an Angular app to be used.In app.component.ts make a function that triggers on blur event.In app.component.html make an input element and set blur event.Serve the angular app using ng serve to see the output. Example 1: app.component.ts import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { onBlur(): void { console.log('Focus Is Lost for this Element'); } } app.component.html <br> <form> <input placeholder="Name" (blur) = 'onBlur()'> </form> Output: Example 2: app.component.ts import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { onBlur(): void { console.log('Focus Is Lost for this Element'); } } app.component.html <br> <form> <button (blur) = 'onBlur()'>Click Here!!</button> </form> Output: Last Updated : 04 Jul, 2021 Like Article Save Article Previous What is CurrencyPipe in Angular 10 ? Next jQuery Mobile Selectmenu Widget disabled Option Share your thoughts in the comments Add Your Comment Please Login to comment...