Following a tutorial on Elixir and the Phoenix framework when this came up. The code is supposed to be
template.innerHTML = `
<a href="#" data-seek="${this.esc(at}">
<b>${this.esc(user.username)}</b>:${this.esc(body)}
</a>`
Although this produces a compile error on the second line. If I change it to:
template.innerHTML =
'<a href="#" data-seek="${this.esc(at}">' +
'<b>${this.esc(user.username)}</b>:${this.esc(body)}' +
'</a>'
Then there are no errors, but it will display the exact string, and not replace the ${} sections. Not to sure what is going on. In the first snip-it, are the "quotes" wrapping around the string supposed to be back ticks or something else? Hard to tell looking at the book I'm reading.
this.esc()function in the template.