Created
April 20, 2018 20:51
-
-
Save nerdic-coder/0fea501ef49217b42a9a66b000b10370 to your computer and use it in GitHub Desktop.
heroes.tsx with hero object
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 '@stencil/core'; | |
import { Hero } from '../../models/hero'; | |
@Component({ | |
tag: 'app-heroes', | |
styleUrl: 'heroes.css' | |
}) | |
export class Heroes { | |
private hero:Hero = { | |
id: 1, | |
name: 'Windstorm' | |
}; | |
render() { | |
return ( | |
<div> | |
<h2>{ this.hero.name } Details</h2> | |
<div><span>id: </span>{this.hero.id}</div> | |
<div><span>name: </span>{this.hero.name}</div> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment