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/ccf891d25ced99828ca5cc7e6f4c39ad to your computer and use it in GitHub Desktop.
Save chidumennamdi/ccf891d25ced99828ca5cc7e6f4c39ad to your computer and use it in GitHub Desktop.
@Component({
...
template:`
{{count}}
<button (click)="up()">Click</button>
`,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class DOMComponent{
count = 0
up() {
this.count++
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment