lightview
Version:
Small, simple, powerful web UI and micro front end creation ... Great ideas from Svelte, React, Vue and Riot combined.
33 lines (29 loc) • 724 B
HTML
<html>
<head>
<title>Template</title>
<template id="local-component">
<p>
<button l-on:click="click">Click Me</button>
</p>
<p>
${message ? message : ""}
</p>
<script type="lightview/module">
self.variables({message: "string"}, {reactive});
self.click = (event) => {
message = "Hi there!";
};
</script>
</template>
<script src="../../lightview.js"></script>
<script>
Lightview.createComponent("x-hello", document.getElementById("local-component"));
</script>
</head>
<body>
<div style="margin:20px">
<x-hello></x-hello>
</div>
</body>
</html>