///<reference path='../../../typings/angular2/angular2'/>
import {Component, View, bootstrap} from 'angular2/angular2';
import { Router } from 'angular/router';
import {Login} from '../login/login';
@Component({
selector: 'my-app',
})
@View({
template: '<login></login>'
})
// Component controller
export class FreshairAppComponent {
constructor(router:Router) {
router
.config(['/login',Login,'login'])
.then(()=>router.navigate('login'));
}
}
bootstrap(FreshairAppComponent);
打字稿(1.5)输出:
/usr/bin/tsc --sourcemap /home/larry/Projects/FreshAir2/src/components /app/app.ts --target es5 --m commonjs --emitDecoratorMetadata --outdir /home/larry/Projects/FreshAir2/ public/js
/home/larry/Projects/FreshAir2/src/components/app/app.ts(4,24):错误 TS2307:找不到外部模块“角度/路由器”。
我错过了什么?