Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input #inputRef
- type="text"></input>
- <child-component *ngIf="inputRef"
- [inputRef]="inputRef"></child-component>
- ...
- @Input() inputRef: HTMLInputElement;
- ngOnInit() {
- this.inputRef.onfocus = () => console.log('focused');
- }
- ...
Add Comment
Please, Sign In to add comment