test(router): add tests for router.d.ts

Closes #3282
This commit is contained in:
Brian Ford
2015-08-04 15:08:59 -07:00
parent 166688348a
commit 450d3630cc
9 changed files with 49 additions and 12 deletions

View File

@ -0,0 +1,33 @@
///<reference path="../dist/docs/typings/angular2/angular2.d.ts"/>
///<reference path="../dist/docs/typings/angular2/router.d.ts"/>
import {Component, bootstrap, View} from 'angular2/angular2';
import {RouteConfig, routerDirectives, routerInjectables} from 'angular2/router';
@Component({
selector: 'my-app'
})
@View({
template: '<h1>Hello</h1>',
})
class FooCmp {
}
@Component({
selector: 'my-app'
})
@View({
template: '<h1>Hello {{ name }}</h1><router-outlet></router-outlet>',
directives: routerDirectives
})
@RouteConfig([
{path: '/home', component: FooCmp}
])
class MyAppComponent {
name: string;
constructor() { this.name = 'Alice'; }
}
bootstrap(MyAppComponent, routerInjectables);