created base layouts and fixed structure

This commit is contained in:
Fran Jurmanović
2021-05-29 12:11:04 +02:00
parent 95a729d7d0
commit 4a675ac198
16 changed files with 160 additions and 12 deletions

View File

@@ -0,0 +1,30 @@
import { attr, targets, controller, target } from "@github/catalyst";
import { closest, index, update, isTrue } from "core/utils";
import { html, render, until } from "@github/jtml";
import { PingService } from "services/";
import { RouterService } from "core/services";
@controller
class AppMainElement extends HTMLElement {
public routerService: RouterService;
constructor() {
super();
}
connectedCallback() {
this.routerService = new RouterService(this);
this.routerService.setRoutes([
{
path: "/",
component: "home-page",
layout: "menu-layout",
},
{
path: "/home",
component: "home-page",
},
]);
this.routerService.init();
}
}
export type { AppMainElement };