Skip to content

Instantly share code, notes, and snippets.

@afirdousi
Last active June 27, 2017 20:41
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/e05bbad92d785ee996b463fb56eac079 to your computer and use it in GitHub Desktop.
Save afirdousi/e05bbad92d785ee996b463fb56eac079 to your computer and use it in GitHub Desktop.
@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(InputReference) // not using 'input' selector here
injectedInput: InputReference; // not of type HTMLInputElement anymore
constructor() {
}
ngAfterContentInit(){
console.log('*************');
console.log('injectedInput:', this.injectedInput);
console.log('*************');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment