Hi Harsal,

No, a `@Hostlistener()` is not going to be able to handle this.

I think you are best off with a small helper directive, that uses the 
abstractControl
import { Directive, DoCheck, Self } from '@angular/core';
import { NgControl } from '@angular/forms';

@Directive({
// tslint:disable-next-line:directive-selector
selector: 'input[type=text]'
})
export class InputFullWithDirective implements DoCheck {
constructor(@Self() private control: NgControl) {}

ngDoCheck() {
// in here use the controll to do your thing
}

}

There is probably a smarter way instead of the doCheck life-cycle hook, but 
this should get you started.
Can you build from here?

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to