Angular 2 - 按需添加URL参数
Angular 2 - add URL parameter on demand
是否有一些方法可以使用代码添加新的 URL 参数,例如:
http://example.com/mypage?par=1&par2=2
我的代码需要这样的东西:
if (myVar == 'abc') {
// add a par3=3 without navigate/refresh the page - just to
// add a decoration on the URL for bookmarks purposes,
// for example: when user bookmark it and go back,
//I will be displaying the same dialog box
}
是否有一些方法可以使用代码添加新的 URL 参数,例如:
http://example.com/mypage?par=1&par2=2
我的代码需要这样的东西:
if (myVar == 'abc') {
// add a par3=3 without navigate/refresh the page - just to
// add a decoration on the URL for bookmarks purposes,
// for example: when user bookmark it and go back,
//I will be displaying the same dialog box
}