Created
February 26, 2016 15:29
-
-
Save lukaszewczak/18233ab68943afcd9f76 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 '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