Skip to content

Commit

Permalink
frontend: add New button calling /items/new
Browse files Browse the repository at this point in the history
  • Loading branch information
marijanp committed Sep 19, 2024
1 parent 79e4c9d commit 0b8788c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<title>Demo</title>
</head>
<body>
<div id="app" hx-get="/api/v1/items" hx-trigger="load">
<button hx-post="/api/v1/items/new" hx-swap="none">New</button>
<div hx-get="/api/v1/items" hx-trigger="load, newItem from:body">
</div>
<noscript>
<p lang="en">
Expand Down

0 comments on commit 0b8788c

Please sign in to comment.