-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chris Nelson
committed
Jan 13, 2024
1 parent
2df8a5c
commit dbf40fc
Showing
2 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,10 @@ | |
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"phx-live-state": "https://ga.jspm.io/npm:[email protected].1/build/src/index.js", | ||
"phx-live-state": "https://ga.jspm.io/npm:[email protected].2/build/src/index.js", | ||
"template-parts": "https://ga.jspm.io/npm:[email protected]/template-parts.js", | ||
"templize/templize.js": "https://ga.jspm.io/npm:[email protected]/templize.js" | ||
"templize/templize.js": "https://ga.jspm.io/npm:[email protected]/templize.js", | ||
"wc-context": "https://ga.jspm.io/npm:[email protected]/core.js" | ||
}, | ||
"scopes": { | ||
"https://ga.jspm.io/": { | ||
|
@@ -17,8 +18,7 @@ | |
"reflect-metadata": "https://ga.jspm.io/npm:[email protected]/Reflect.js", | ||
"sube": "https://ga.jspm.io/npm:[email protected]/sube.js", | ||
"subscript": "https://ga.jspm.io/npm:[email protected]/subscript.js", | ||
"subscript/parse.js": "https://ga.jspm.io/npm:[email protected]/parse.js", | ||
"wc-context": "https://ga.jspm.io/npm:[email protected]/core.js" | ||
"subscript/parse.js": "https://ga.jspm.io/npm:[email protected]/parse.js" | ||
} | ||
} | ||
} | ||
|
@@ -28,7 +28,7 @@ | |
</script> | ||
</head> | ||
<body> | ||
<live-template url="wss://live-templates-example.fly.dev/live_state" topic="todo:all"> | ||
<live-template url="ws://localhost:4000/socket" topic="todo:all" provide-context="mrstate"> | ||
<template> | ||
<ul> | ||
<li :each="{{todo in todos}}">{{todo}}</li> | ||
|
@@ -41,5 +41,9 @@ | |
</template> | ||
<div>some fallback content</div> | ||
</live-template> | ||
<live-template consume-context="mrstate"> | ||
|
||
<div :each="{{todo in todos}}">{{todo}}</div> | ||
</live-template> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters