Skip to content

Instantly share code, notes, and snippets.

@lukaszewczak
Created February 26, 2016 15:29
Show Gist options
  • Save lukaszewczak/18233ab68943afcd9f76 to your computer and use it in GitHub Desktop.
Save lukaszewczak/18233ab68943afcd9f76 to your computer and use it in GitHub Desktop.
import {Component} from 'angular2/core';
import {Hero} from './hero'
@Component({
select: 'my-hero-detail',
template: `
<div *ngIf="hero">
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div>
<label>name: </label>
<div><input [(ngModel)]="hero.name" placeholder="name"></div>
</div>
</div>`,
inputs: ['hero']
})
export class HeroDetailComponent {
hero: Hero;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment