Last active
June 27, 2017 09:12
-
-
Save afirdousi/9378e7da1f5d95cdf51de1e7a40833b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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