0.9.0 • Published 23 days ago
@esroute/lit v0.9.0
@esroute/lit
An integration of esroute into lit
This library provides a renderRoutes()
directive to render the routes that are resolved by the router.
You can use the createRouter()
factory to create the router instance.
Example
import { createRouter, renderRoutes } from "@esroute/lit";
import { html, LitElement } from "lit";
import { customElement } from "lit/decorators.js";
const router = createRouter({
routes: {
"": () =>
import("./routes/root").then(() => html`<esroute-root></esroute-root>`),
foo: {
"*": ({ params: [name] }) =>
import("./routes/foo").then(
() => html`<my-greeter greeting=${name}></my-greeter>`
),
},
},
});
@customElement("my-demo")
export class Demo extends LitElement {
render() {
return html`${renderRoutes(router)}`;
}
}
0.9.0
23 days ago
0.8.3
23 days ago
0.8.2
4 months ago
0.8.1
10 months ago
0.7.2
1 year ago
0.8.0
1 year ago
0.7.1
1 year ago
0.7.0
1 year ago
0.5.4
2 years ago
0.5.3
2 years ago
0.5.0
2 years ago
0.6.1
2 years ago
0.5.2
2 years ago
0.6.0
2 years ago
0.5.1
2 years ago
0.1.2
2 years ago
0.2.0
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago