164. Understanding file change event (#22)
This commit is contained in:
@ -219,7 +219,8 @@
|
||||
</div>
|
||||
<div class="custom-file">
|
||||
<input type="file" accept="image/*" name="profileImage"
|
||||
class="custom-file-input">
|
||||
(change)="onProfileImageChange($event)"
|
||||
class="custom-file-input" >
|
||||
<label class="custom-file-label">
|
||||
<span [hidden]="true"> fileName </span>
|
||||
<span [hidden]="false">Choose File</span>
|
||||
|
||||
@ -64,6 +64,10 @@ export class UserComponent implements OnInit, OnDestroy {
|
||||
document.getElementById('openUserInfo')?.click();
|
||||
}
|
||||
|
||||
public onProfileImageChange(event: any): void {
|
||||
console.log(event);
|
||||
}
|
||||
|
||||
private sendErrorNotification(message: string) {
|
||||
this.notificationService.notify(NotificationType.ERROR, message ? message : 'An error occurred. Please try again')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user