Skip to content

Commit

Permalink
Update app.R
Browse files Browse the repository at this point in the history
  • Loading branch information
sounkou-bioinfo authored Oct 16, 2024
1 parent 582b90c commit 24b994c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ home_get <- function(req, res) {
<h1>Hello World using Ambiorix and HTMX from R</h1>
<div style="display:flex;flex-direction: row;align-items: flex-start; gap:20px;">
<button hx-post="/clicked" hx-swap="innerHTML">
<button hx-post="./clicked" hx-swap="innerHTML">
Click Me
</button>
<div>
<p>The following plot is loaded automagically</p>
<div
hx-get="/plot"
hx-get="./plot"
hx-trigger="load"
style="height:400px;width:400px">
"Loading plot..."
Expand All @@ -42,7 +42,7 @@ home_get <- function(req, res) {
<div>
<p>The following plot is loaded/updated on button click</p>
<button
hx-get="/plot2"
hx-get="./plot2"
hx-swap="innerHTML show:top"
hx-target="#target-plot">
Update Plot
Expand Down Expand Up @@ -112,4 +112,4 @@ Ambiorix$
post("/clicked", nclicks_get)$
get("/plot2", plot2_get)$
get("/plot", plot_get)$
start()
start()

0 comments on commit 24b994c

Please sign in to comment.