I use angular2
if the url is like this :
url?sort=field1,asc&sort=field2,desc
I use
getParams() {
if (this.route.snapshot.queryParams) {
console.log(this.route.snapshot.queryParams)
// it print like this : sort: "[object Object]"
console.log(typeof this.route.snapshot.queryParams['sort']); // is string
}
}
How to get "field1,asc" and "field2,desc" form sort: "[object Object]"