Last active
June 27, 2017 20:41
-
-
Save afirdousi/e05bbad92d785ee996b463fb56eac079 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
@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