I have a multi view layout where each view is a also a tab. When I use this layout, all works as expected (“page-1” is renderd and within this page, I have a router-link to “page-2” which also work):
...
<div class="view view-main tab tab-active" id="view-1">
<!-- I put the page 1 within my view -->
<!-- Other pages are loaded by router ajax and it works -->
<div class="page" data-name="page-1">
..
</div>
</div>
...
I dont understand. My document location path is common “index.html” (which is on the root path). Setting this, does not help:
pushState: true, // if setting true, init ajax page does not work
pushStateSeparator: "!",
pushStateRoot: "/",
Setting pushStateRoot: “/home/” does also not work.
So what should I put there? And why does it work when I dont use multi view layout? If I dont use mult-view-layout, then all routes work and pushState=true also works without providing pushStateRoot or pushStateSeparator.
In this document, I have all my views and each view is created by “componentUrl”. Navigation works, but if I set “pushState=true”, the main-view is not rendered (blank area). Only the tabbar at bottom is shown which is outside of the the main-view (I have routable tabs where each tab is a view, and one of the tab is the main-view).
If you want to cover both cases when there is ‘/index.html’ in url and not, then it needs more bulletproof solution. In case you are using default pushStateSeparator then it will be:
Just checked in Kitchen sink, all works. Home page must be “/“ as I said in my example. When push state is enabled then your route paths must reflect the document location to work
In my case, it does not work - the component is not rendered within the tab (tab is switched to class="view view-main tab tab-active", but inner component is not rendered, when using pushState=true). I will dig into kitchen sink config and try to find. I will let you know…
pushStateRoot="/" or "test" does not work, it must be location.href.split(location.host)[1].split('#!')[0]. As this view is the main-view, I can use url: "/" for home-url.
Hello, have you solved it now? I read your answer from beginning to end, but I still don’t. Would you like to send me a source code? Or help me look at my code, thanks, I’m going crazy!