-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlive_template.html
45 lines (45 loc) · 1.86 KB
/
live_template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<html></html>
<head>
<!-- Generated by @jspm/generator VSCode Extension - https://github.com/jspm/jspm-vscode -->
<script async src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymous"></script>
<script type="importmap">
{
"imports": {
"@launchscout/live-template": "https://ga.jspm.io/npm:@launchscout/[email protected]/index.js"
},
"scopes": {
"https://ga.jspm.io/": {
"json-joy/esm/json-patch": "https://ga.jspm.io/npm:[email protected]/esm/json-patch/index.js",
"phoenix": "https://ga.jspm.io/npm:[email protected]/priv/static/phoenix.mjs",
"phx-live-state": "https://ga.jspm.io/npm:[email protected]/build/src/index.js",
"process": "https://ga.jspm.io/npm:@jspm/[email protected]/nodelibs/browser/process.js",
"reflect-metadata": "https://ga.jspm.io/npm:[email protected]/Reflect.js",
"sprae": "https://ga.jspm.io/npm:[email protected]/sprae.js",
"subscript": "https://ga.jspm.io/npm:[email protected]/subscript.js",
"swapdom/deflate": "https://ga.jspm.io/npm:[email protected]/deflate.js",
"wc-context": "https://ga.jspm.io/npm:[email protected]/core.js"
}
}
}
</script>
<script type="module">
import '@launchscout/live-template';
</script>
</head>
<body>
<h1>Live template chat</h1>
<live-template url="ws://localhost:4000/live_state" topic="chat_room:denver_elixir">
<div :each="message in messages">
<h1 :text="message.author"></h1>
<p :text="message.message" />
</div>
<form :sendsubmit="send_message">
<label>Author</label>
<input name="author" />
<label>MEssage</label>
<input name="message" />
<button>SEnd it!!</button>
</form>
</live-template>
</body>
</html>