mirror of
https://github.com/FJurmanovic/wallet-web.git
synced 2026-11-11 15:51:10 +00:00
created base layouts and fixed structure
This commit is contained in:
30
src/components/app-main/AppMainElement.ts
Normal file
30
src/components/app-main/AppMainElement.ts
Normal 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 };
|
||||
Reference in New Issue
Block a user