Open Dale-Black opened 1 year ago
Also, HypertextLiteral.jl doesn't work with Observables as far as I know. But if it were possible to do something like
@get "/obs/counter" function ()
counter = Observable(0)
return string(@htl """
<label>$(counter)</label>
<button onclick=$(counter += 1)>Click me</button>
""")
end
This would be incredible!
I created a super simple app with Oxygen that has various routes. In this, I created an HTML page using HypertextLiteral.jl (HTL) and a counter using HTL and the
<script>
tag inside the@htl
macro.I now want to recreate this simple functionality using Observables.jl (and maybe WebIO or whatever) inside this Oxygen app. Is there a simple way to go about this? Here is the
app.jl
file and if someone could direct me on how to make a route like/counter
but using Observables, that would be a helpful starting place!