Guest User

Untitled

a guest
Jan 17th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import { Component, Input, AfterViewInit } from '@angular/core';
  2.  
  3. @Component({
  4. selector: 'hello',
  5. template: `<h1>Hello {{name}}!</h1>`,
  6. styles: [`h1 { font-family: Lato; }`]
  7. })
  8. export class HelloComponent implements AfterViewInit {
  9. @Input() name: string;
  10.  
  11. ngAfterViewInit() {
  12. setTimeout(() => {
  13. this.name = 'foo';
  14. });
  15. }
  16. }
Add Comment
Please, Sign In to add comment