Commit 7fda7676 authored by Jakob Moser's avatar Jakob Moser
Browse files

Document routing strategy

parent 2bb6d897
Loading
Loading
Loading
Loading
+7 −4
Changes for frontend/karaokatalog.mjs: 7 added lines, 4 removed lines.
Original line number Diff line number Diff line
// TODO Import mithril.mjs

import { AppLayout } from "./app.mjs";
import { Base } from "./components/pages/Base.mjs";
import { AppLayout } from "./app.mjs"

// See https://mithril.js.org/route.html#routing-strategies
// TODO m.route.prefix = ""
/*
 * We leave the default routing strategy (https://mithril.js.org/route.html#routing-strategies), i.e.,
 * with a #! prefix, and do not change m.route.prefix.
 *
 * This is to make it easier to deploy this app on servers without changing the configuration.
 */
m.route(document.body, "/all", {
    "/all": AppLayout,
    "/favorites": AppLayout,