DIRECTIVA UPPERCASED

import { DirectiveInputElementRefHostListener } from '@angular/core';
import { NgControl } from '@angular/forms';
 
@Directive({
  selector: '[Uppercased]'
})
 
export class UppercasedDirective {
  @Input() Uppercased;
 
  constructor(private refElementRefprivate controlNgControl) { }
 
  @HostListener('input', ['$event']) onEvent($event) {
    const strstring = this.control.value;
    this.control.control.setValue(str.toUpperCase());
  }
}