Created
May 7, 2016 01:04
-
-
Save Arafat245/f15e5e780f793c08fb56b1408cd63e13 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 '@angular/core'; | |
| export class Hero { | |
| id: number; | |
| name: string; | |
| } | |
| @Component({ | |
| template:` | |
| <h1>{{title}}</h1> | |
| <h2>{{hero.name}} details!</h2> | |
| <div><label>id: </label>{{hero.id}}</div> | |
| <div> | |
| <label>name: </label> | |
| <input [(ngModel)]="hero.name" placeholder="name"> | |
| </div> | |
| `, | |
| moduleId: module.id, | |
| selector: 'basemodel-angular-app', | |
| templateUrl: 'basemodel-angular.component.html', | |
| styleUrls: ['basemodel-angular.component.css'] | |
| }) | |
| export class BasemodelAngularAppComponent { | |
| title = 'Tour of Heros'; | |
| hero: Hero = { | |
| id: 1, | |
| name: 'Windstorm' | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment