Skip to content

Instantly share code, notes, and snippets.

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 kunjee17/b99f389df55337f36605f549a97e7ec5 to your computer and use it in GitHub Desktop.
Save kunjee17/b99f389df55337f36605f549a97e7ec5 to your computer and use it in GitHub Desktop.
Simple Component
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