1
我使用的RC路由器的RC1和我定义了两个路线如下方案路线导航:问题用角2 RC路由器
@Routes([
{path: '/', component: HomeComponent},
{path: '/signin', component: SigninComponent},
{path: '/dashboard', component: DashboardComponent}
])
,我试图在注册时浏览到'/signin'
出来的如下:
import {Router} from "@angular/router";
@Component({
selector: '[signout]',
templateUrl: 'app/session/session.signout.component.html',
directives: [CORE_DIRECTIVES],
pipes: [TranslatePipe]
})
export class SignoutComponent {
constructor(private router:Router,
private sessionService:SessionService) {
}
signout() {
this.sessionService.signout();
//FIXME: does not navigate to '/signin'
this.router.navigate(['/signin']);
}
}
然而,当我登出,在浏览器中显示的路径/ URL是根URL(/
),而不是登入网址...
我错了什么?
没有运气提供的解决方案。你能指点我在github中的相关问题吗? – balteo
这是在几个地方提到的。一个是https://github.com/angular/angular/issues/8420 –
谢谢。我在控制台中没有任何异常。这可能是一个不同的错误。我会等到新的RC出来看看。 – balteo