Closed checketts closed 2 months ago
Addresses #127
This enables the following usecase:
@GetMapping("/admin") fun getAdmin(htmxResponse: HtmxResponse.Builder): JteModel { htmxResponse.trigger("aTrigger") return templates.adminIndex("Hello") }
The JteModel is a typed template. But the HtmxResponse can be used as an argument to inform any triggers, redirect, etc. that need to happen.
JteModel
HtmxResponse
This change also supports adding HtmxReponse to the model and being processed, if that approach is needed.
HtmxReponse
Can you add some documentation to the README on how to use this?
I've added the readme examples.
Addresses #127
This enables the following usecase:
The
JteModel
is a typed template. But theHtmxResponse
can be used as an argument to inform any triggers, redirect, etc. that need to happen.This change also supports adding
HtmxReponse
to the model and being processed, if that approach is needed.