angular-cn/typing_spec/basic_spec.ts

17 lines
284 B
TypeScript
Raw Normal View History

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);