Created
June 3, 2019 08:10
-
-
Save kunjee17/b99f389df55337f36605f549a97e7ec5 to your computer and use it in GitHub Desktop.
Simple Component
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'; | |
import { Hero } from './hero'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './Component.html', | |
styleUrls : ['./Component.css'] | |
}) | |
export class AppComponent { | |
title = 'Tour of Heroes'; | |
heroes = [ | |
new Hero(1, 'Windstorm'), | |
new Hero(13, 'Bombasto'), | |
new Hero(15, 'Magneta'), | |
new Hero(20, 'Tornado') | |
]; | |
myHero = this.heroes[0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment