这是我的设置:
import {bootstrap} from 'angular2/platform/browser'; import {Component} from 'angular2/core'; import {LocationStrategy, APP_BASE_HREF, HashLocationStrategy, ROUTER_DIRECTIVES, Router, RouteConfig, ROUTER_PROVIDERS} from 'angular2/router'; import {HomeComponent} from "../components/HomeComponent"; import {provide} from "angular2/core"; @Component({ selector: 'app', template: `Home`, directives: [ROUTER_DIRECTIVES] }) @RouteConfig([ { path: '/', component: HomeComponent, name: 'HomeComponent' } ]) class RootComponent { constructor(router:Router) { } } bootstrap(RootComponent, [ROUTER_PROVIDERS, provide(LocationStrategy, {useClass: HashLocationStrategy}) , provide(APP_BASE_HREF, {useValue: '/'})]);
我一直得到这个错误,任何帮助表示赞赏
我正在使用最新的Beta.0
问候
肖恩