Created
April 2, 2018 01:50
-
-
Save vietduchelo/04506accdbb581ae6ff831b86dd8a5aa 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: 'app-root', | |
template: ` | |
<h1>{{title}}</h1> | |
<h2>My favorite hero is: {{myHero}}</h2> | |
` | |
}) | |
export class AppComponent { | |
title = 'Tour of Heroes'; | |
myHero = 'Windstorm'; | |
} | |
export class AppCtorComponent { | |
title: string; | |
myHero: string; | |
constructor() { | |
this.title = 'Tour of Heroes'; | |
this.myHero = 'Windstorm'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment