Created
May 26, 2016 05:03
-
-
Save fastcodecoq/fb12e9d30b03603f2dcf43086db82801 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
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'click-me', | |
template: ` | |
<button (click)="onClickMe()">Click me!</button> | |
{{clickMessage}}` | |
}) | |
export class ClickMeComponent { | |
clickMessage = ''; | |
onClickMe(){ | |
this.clickMessage ='You are my hero!'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment