You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to host my Tonic app using static file hosting, so I can't have users request paths that don't really exist (actually I am experimenting with web extensions, so it's not really hosted at all). That's why I keep my application paths inside the hash fragment of the URL. I can't get TonicRouter to match these, though.
Initially I only got a blank page (so not even the none router matched), but I managed to resolve that using the pushState-hack. but still, I am not able to get it to match the itworks-router.
Is this intended?
importTonicfrom'@socketsupply/tonic';import{TonicRouter}from'@socketsupply/components/router';classMWEextendsTonic{connected(){window.history.pushState({},"",window.location);// HACKthis.addEventListener('match',this.reRender);}render(){returnthis.html`<tonic-routerid="itworks-router" path="/#/itworks"> it works</tonic-router><tonic-routerid="notfound-router" none> it at least sort of works</tonic-router> `;}}Tonic.add(TonicRouter);Tonic.add(MWE);document.body.innerHTML='<m-w-e id="container"></m-w-e>';
The text was updated successfully, but these errors were encountered:
I want to host my Tonic app using static file hosting, so I can't have users request paths that don't really exist (actually I am experimenting with web extensions, so it's not really hosted at all). That's why I keep my application paths inside the hash fragment of the URL. I can't get TonicRouter to match these, though.
Initially I only got a blank page (so not even the
none
router matched), but I managed to resolve that using thepushState
-hack. but still, I am not able to get it to match the itworks-router.Is this intended?
The text was updated successfully, but these errors were encountered: