0.10.1 • Published 6 months ago
@esroute/lit v0.10.1
@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.10.0
6 months ago
0.10.1
6 months ago
0.9.0
2 years ago
0.8.3
2 years ago
0.8.2
2 years ago
0.8.1
2 years ago
0.7.2
3 years ago
0.8.0
3 years ago
0.7.1
3 years ago
0.7.0
3 years ago
0.5.4
3 years ago
0.5.3
3 years ago
0.5.0
3 years ago
0.6.1
3 years ago
0.5.2
3 years ago
0.6.0
3 years ago
0.5.1
3 years ago
0.1.2
3 years ago
0.2.0
3 years ago
0.1.1
3 years ago
0.1.0
4 years ago