Commit 10b509ea authored by Matthieu Fesselier's avatar Matthieu Fesselier

bugfix: add id

parent d6771be1
Pipeline #4697 passed with stage
in 27 seconds
......@@ -80,12 +80,12 @@ export default class SIBRouter extends HTMLElement {
}
const id = resource ? resource['@id'] : null;
if (!keepURL) {
this.updateURL(route)
this.updateURL(route, id)
}
this.display(routeName, id, keepURL);
}
updateURL(route) {
updateURL(route, id) {
const path = route.getPath(this.prefix, route.name, route.hasAttribute('use-id') ? id : '', route.name == this.defaultRoute);
const prefix = this.useHash ? '#' : '/';
history.pushState({}, route.name, prefix + path); // update current URL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment