Skip to content
Advertisement

How can I put the variable in the inline javascript [[]] api path

I have a question, I need make up the url in the javasctipt. But I don’t known how to put the variable in the th:inline=”javascript” . My code below:

JavaScript

How can I make up the url using the variable in the [[]].

JavaScript

It’s will show error. How can I use the js variable put in the [[]].

Thank you very much.

Advertisement

Answer

You can do it like this:

JavaScript

In the JavaScript console, this prints:

http://localhost:3000/users/?size=10

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement