0
后代码路由我知道,使用routerLink
指令,我能够路由到一个目的地:angular2:可观察的成功
<a [routerLink]=" ['/app'] ">LogOut</a>
这是建立在您的网站链接的静态方法。
public createAccount():void {
this.clearAlerts();
this.commty.create(this.form.value.mail, this.form.value.passwd)
.subscribe(
(result: any) => { // <-- handler for result
>>>>>>>>>> go to '/app' route <<<<<<<<<<<<<<<
},
(error: any) => { // <-- handler for error
this.addAlert(error.message);
}
);
}
我想一定有办法做到这一点使用打字稿代码... 你能提供给我:
尽管如此,有时路线必须根据如果http
请求已经被正确处理完成一个例子或任何文件?