angular-cn/typing_spec/basic_spec.ts

17 lines
284 B
TypeScript

import {Component, bootstrap, View} from 'angular2/angular2'
@Component({
selector: 'my-app'
})
@View({
template: '<h1>Hello {{ name }}</h1>'
})
// Component controller
class MyAppComponent {
name: string;
constructor() { this.name = 'Alice'; }
}
bootstrap(MyAppComponent);