Skip to content

Instantly share code, notes, and snippets.

@afirdousi
Last active June 27, 2017 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afirdousi/9378e7da1f5d95cdf51de1e7a40833b3 to your computer and use it in GitHub Desktop.
Save afirdousi/9378e7da1f5d95cdf51de1e7a40833b3 to your computer and use it in GitHub Desktop.
import {
Component,
Input,
ContentChild,
AfterContentInit
}
from '@angular/core';
@Component({
selector: 'my-custom-input',
templateUrl: 'src/my-custom-input.component.html',
styleUrls:['src/my-custom-input.component.css']
})
export class MyCustomInput implements AfterContentInit {
@Input() label;
@ContentChild('input')
injectedInput: HTMLInputElement;
ngAfterContentInit(){
console.log('Injected Input Reference: ', this.injectedInput);
}
constructor() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment