Skip to content

Instantly share code, notes, and snippets.

@Arafat245
Created May 7, 2016 01:04
Show Gist options
  • Select an option

  • Save Arafat245/f15e5e780f793c08fb56b1408cd63e13 to your computer and use it in GitHub Desktop.

Select an option

Save Arafat245/f15e5e780f793c08fb56b1408cd63e13 to your computer and use it in GitHub Desktop.
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