Skip to content

Commit 0b8788c

Browse files
committed
frontend: add New button calling /items/new
1 parent 79e4c9d commit 0b8788c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

frontend/index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
<title>Demo</title>
99
</head>
1010
<body>
11-
<div id="app" hx-get="/api/v1/items" hx-trigger="load">
11+
<button hx-post="/api/v1/items/new" hx-swap="none">New</button>
12+
<div hx-get="/api/v1/items" hx-trigger="load, newItem from:body">
1213
</div>
1314
<noscript>
1415
<p lang="en">

0 commit comments

Comments
 (0)