Last active
January 12, 2018 05:14
-
-
Save pycraft114/26085387b3fa6631b1e4acf72fc67b01 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
@Component({ | |
template: ` | |
<h1>Hello! {{firstName}} {{lastName}}</h1> | |
<button (click)="changeName()">Change name</button> | |
` | |
}) | |
class MyApp { | |
firstName:string = 'Super'; | |
lastName:string = 'Cat'; | |
changeName() { | |
this.firstName = 'Agent'; | |
this.lastName = 'Mouse'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment