grails-core
grails-core copied to clipboard
ES6 Literal Template Support inside GSP Pages
The following will not work inside a gsp and will throw an exception.
<script type="text/javascript">
const name = 'Bob';
console.log(`Hello ${name}`)
</script>
Workaround:
<script type="text/javascript">
const name = 'Bob';
console.log(${raw('`Hello ${name}`')})
</script>
but a workaround shouldn't be necessary if 1. currently in a block AND inside ``.