2017-02-09 68 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) –

回答

相關問題