import {Component, bootstrap, View} from 'angular2/angular2'; import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from 'angular2/router'; @Component({ selector: 'my-app' }) @View({ template: '

Hello

', }) class FooCmp { constructor(a: string, b: number) {} } @Component({ selector: 'my-app' }) @View({ template: '

Hello {{ name }}

', directives: ROUTER_DIRECTIVES }) @RouteConfig([ {path: '/home', component: FooCmp} ]) class MyAppComponent { name: string; constructor() { this.name = 'Alice'; } } bootstrap(MyAppComponent, ROUTER_PROVIDERS);