Closed yubaoquan closed 6 years ago
Some more details in here: https://github.com/ultraq/thymeleaf-js/issues/8#issuecomment-332541321
Thanks for raising this issue @yubaoquan 👍
I've added some basic support for URL expressions and made a release with them. I based them off the examples in the Thymeleaf docs (http://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#link-urls) but I couldn't see any for the examples you had in the linked issue. Examples like: @{http://www.baidu.com?query(p=${a})}
where the URL part already has a ?
in it. What's the expected behaviour of that?
The sorts of things I've added are support for creating a search string from the parameters part of the URL, eg: where a = "hello":
@{http://www.baidu.com/(p=${a})}
-> http://www.baidu.com/?p=hello
And placeholders in the URL, eg: where a = "hello";
@{http://www.baidu.com/{path}/(path=${a})}
-> http://www.baidu.com/hello/
OK thanks for the work. Maybe the example i wrote before contains some typos. I'll check the doc later.
Closing, this has been added.
Currently url expression cannot be correctly rendered, need working on it.