2017-02-09 66 views
2

在Angular 2中,如何在URL中包含问号和等号?我试过有以下两种方式:包含“?”和Angular 2的URL中的“=”

在HTML:

routerLink="./Example?tour=true" 

和打字稿:

this.router.navigate(['/Example?tour=true']); 

两个例子都导致:/Example%3Ftour%3Dtrue

如何让我的工作和显示我想要的方式的网址?

+0

相关:【如何处理查询参数角2](http://stackoverflow.com/questions/34599174/how-to-handle-query-parameters -in-angular-2) –

回答

相关问题