Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. @Component({
  2. selector: 'my-custom-input',
  3. templateUrl: 'src/my-custom-input.component.html',
  4. styleUrls:['src/my-custom-input.component.css']
  5. })
  6. export class MyCustomInput implements AfterContentInit {
  7.  
  8. @Input() label;
  9.  
  10. @ContentChild(InputReference) // not using 'input' selector here
  11. injectedInput: InputReference; // not of type HTMLInputElement anymore
  12.  
  13. constructor() {
  14. }
  15.  
  16. ngAfterContentInit(){
  17. console.log('*************');
  18. console.log('injectedInput:', this.injectedInput);
  19. console.log('*************');
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement