I need to make an entire application to have uppercase letters while typing. so I tried using in HTML like below.

```
 #input (input)="input.value=$event.target.value.toUpperCase()"

```

And also I went through a directive, which makes inputs into uppercase while typing, but both the things don't allow `ctrl + z`,
when I do `ctrl + z`, then if the input field is empty it must give me empty value, when on edit mode, if there was value already and we try to edit and do `ctrl + z`, then we need to get the value which was stored already.

DEMO:
[DEMO LInk](https://stackblitz.com/edit/angular-form-uppercase-lowercase?file=src%2Fapp%2Fdirectives%2Flowercase-input.directive.ts)

DEMO which i tried:
[DEMO Link of what i tried](https://stackblitz.com/edit/angular-h2m9nz?file=src/app/app.component.html)
Can anyone help me how to solve this