import { Component } from '@angular/core' ; @ Component ( { selector : 'thy-avatar-img-error-example' , templateUrl : './img-error.component.html' } ) export class ThyAvatarImgErrorExampleComponent { avatarSrc = './not_exist/abc.jpg' ; avatarSrcEmpty = '' ; constructor ( ) { } jackieAvatarError ( event ) { console . log ( '---> Jackie Avatar Error' ) ; console . log ( event ) ; } }