Vue Router inside Liferay 7.1Vue Router inside Liferay 7.1https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1134049732024-03-29T00:39:42Z2024-03-29T00:39:42ZRE: Vue Router inside Liferay 7.1Marco Endreshttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1181788762019-12-31T13:55:24Z2019-12-31T13:55:24ZThanks mate I went with something similiar. I got also inspiration from this repo over here:<br /><a href="https://github.com/triberay/liferay-vuejs-routing-experiment">https://github.com/triberay/liferay-vuejs-routing-experiment</a><br />It's still not great, but I'm on it.Marco Endres2019-12-31T13:55:24ZRE: Vue Router inside Liferay 7.1Brendan Johan Leehttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1174222042019-10-09T21:47:50Z2019-10-09T21:47:50ZI just recently had the same issue. Finally managed to make a (sort of hacky) solution: Put this code snippet in your jsp:<script data-senna-track="permanent"><br /> window.addEventListener("popstate", function(event) {<br /> if(document.getElementById("YOUR-UNIQUE-ID")==null){<br /> location.reload();<br /> }<br /> });<br /></script><br />Replace YOUR-UNIQUE-ID with the id of an html element unique to your portlet, that is visible in all routes (so for example one of the generated portlet wrapper divs.This code snippet triggers whenever the popstate changes to the history, anytime your portlet changes the popstate. The data-senna-track="permanent" ensures the snippet is persisted even when you navigate away from the page. (this means you must not turn off senna SPA for your portlet). As long as your portlet is visible, and you navigate between routes by clicking links or back/forth button navigation, the script does nothing. However, if you navigate back to the page, and your portlet is no longer rendered, it will trigger, and refresh the page, so your application works again.I've only tested in chrome and firefox, but I don't see why this shouldn't work for all browsers that support html5 navigation api.Brendan Johan Lee2019-10-09T21:47:50ZVue Router inside Liferay 7.1Marco Endreshttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1134049722019-04-25T12:46:51Z2019-04-25T12:46:51ZHello,<br /><br />I try to create a small Vue application inside of Liferay together with the Vue Router, but when I navigate between Liferay navigation (Senna.js) and my Vue application the History.back doesn't work as expected.<br /><br /><ol style="list-style: decimal outside;" start="1"><li>Switch between some Vue routes</li><li>Go to another Liferay page</li><li>History.back</li></ol>Expected:<br />I go back to the previous Liferay page<br