first, I wasn't that interested in views and there...
# announcements
a
first, I wasn't that interested in views and therefore HREF when I started this road simple smile Second, I can do it from a reference to a function in the form of:
Copy code
kotlin
val getMyThing = fun Context.(parm: String): Thing { ... }
Since I can use a
MyClass::getMyThing
reference to find the route it was attached to.
Copy code
hrefFrom(MyClass::getMyThing)  // bare, ignore query string, error on path parms

hrefFrom(MyClass::getMyThing, mapOf("parm" to parmValue)) // with query or path parms

// or extend the reference itself but maybe only want to do that in context of the system so I
// don't litter references that don't make sense to have an href:

MyClass::getMyThing.href()
Your HREF doesn't really take into consideration which parameters are needed to make the URL, if you want the query string or not, and if some of them are hidden as FORM parameters instead of query/path parameters. You then have to make things nullable that you don't want to have to provide in the query string to generate a bare link (that someone else can add their own query parameters to, or part of them).