Guest User

Untitled

a guest
Jun 22nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. <input #inputRef
  2. type="text"></input>
  3.  
  4. <child-component *ngIf="inputRef"
  5. [inputRef]="inputRef"></child-component>
  6.  
  7. ...
  8. @Input() inputRef: HTMLInputElement;
  9.  
  10. ngOnInit() {
  11. this.inputRef.onfocus = () => console.log('focused');
  12. }
  13. ...
Add Comment
Please, Sign In to add comment