HistoryQuery,
HistoryLocation,
} from './base'
+import { RouteQuery } from '../types'
const PERCENT_RE = /%/g
return search
}
+export function normalizeQuery(query: RouteQuery): HistoryQuery {
+ // TODO: implem
+ return query as HistoryQuery
+}
+
/**
* Prepare a URI string to be passed to pushState
* @param uri
// named or relative route
// we need to resolve first
location = this.matcher.resolve(to, this.currentRoute)
- url = this.history.utils.normalizeLocation(location)
+ url = this.history.utils.normalizeLocation({
+ query: this.history.utils.normalizeQuery(to.query || {}),
+ hash: to.hash,
+ ...location,
+ })
}
// TODO: call hooks, guards