diff --git a/src/App.vue b/src/App.vue index 4959e796731bce36c03295a8d1aeb59a6728be91..417f1c4e77ce123fb700ed907cc3126145b1c668 100644 --- a/src/App.vue +++ b/src/App.vue @@ -79,7 +79,7 @@ export default { if(event._source){ this.search_results = [] this.article = event._source - history.pushState(this.article, '', event._id) + history.pushState(this.article, '', '/' + this.lang + '/' + event._id) }else{ window.location.href = '/' + this.lang + "/search?q=" + event.q } @@ -106,6 +106,11 @@ export default { else { this.waiting = false } + }, + watch: { + $route(to, from) { + this.lang = this.$route.params.lang || 'nob' + } } } </script>