简体   繁体   中英

remove one of multiple query parameters in angular 6+

I get url like http://localhost:4444/categories/fashion?attributeValue=green&attributeValue=red how i could remove from query params attributeValue=red; In result i wanna get something like http://localhost:4444/categories/fashion?attributeValue=green

is that possible with router functionality?

您可以使用新的查询参数导航到当前 url。

this.router.navigate([], queryParams);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM