Skip to content

Instantly share code, notes, and snippets.

@chidumennamdi
Created August 22, 2018 16:51
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 chidumennamdi/6678fd7ebf4fd958b1f766585cad8520 to your computer and use it in GitHub Desktop.
Save chidumennamdi/6678fd7ebf4fd958b1f766585cad8520 to your computer and use it in GitHub Desktop.
@Component({
selector: 'my',
template: `
{{count}}
`
})
export class MyComponent {
@Input()
count:string
}
@Component({
template: `
<my [count]="parentCount"></my>
<button (click)="clickMe()">Click</button>
`
})
export class AppComponent {
parentCount=0
clickMe() {
this.parentCount++
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment