Router transition
This commit is contained in:
2
dist/sigpro.esm.js
vendored
2
dist/sigpro.esm.js
vendored
@@ -365,7 +365,7 @@ var For = (source, renderFn, keyFn, tag = "div", props = { style: "display:conte
|
||||
var Router = (routes) => {
|
||||
const currentPath = $(window.location.hash.replace(/^#/, "") || "/");
|
||||
window.addEventListener("hashchange", () => currentPath(window.location.hash.replace(/^#/, "") || "/"));
|
||||
const outlet = Tag("div", { class: "router-outlet" });
|
||||
const outlet = Tag("div", { class: "router-transition" });
|
||||
let currentView = null;
|
||||
Watch([currentPath], async () => {
|
||||
const path = currentPath();
|
||||
|
||||
Reference in New Issue
Block a user