Top "Template-literals" questions

Wrap long template literal line to multiline without creating a new line in the string

In es6 template literals, how can one wrap a long template literal to multiline without creating a new line in …

javascript ecmascript-6 template-literals
Can ES6 template literals be substituted at runtime (or reused)?

tl;dr: Is it possible to make a reusable template literal? I've been trying to use template literals but I …

javascript ecmascript-6 template-literals
Template literals syntax is not working in IE11

The back-tick character is not recognized as a Valid Character in IE11 when using the "use strict" directive while it …

javascript internet-explorer ecmascript-6 internet-explorer-11 template-literals
Template String As Object Property Name

Why does JavaScript not allow a template string as an object property key? For example, when I input: foo = {`bar`: …

javascript node.js object-literal template-strings template-literals
"Unterminated template literal" syntax error when literal contains script tag

I'm using ES6 template literals to construct some HTML in strings, and so far it has been working fine. However, …

javascript html ecmascript-6 script-tag template-literals
Template literal inside of the RegEx

I tried to place a template literal inside of a RegEx, and it didn't work. I then made a variable …

javascript regex template-literals
How to use es6 template literal as Angular Component Input

In my Angular 4 application, I have a component which takes a string input: <app-my-component [myInput]="'some string value'">&…

javascript angular typescript ecmascript-6 template-literals
Unexpected comma using map()

I've an array with a list of elements and I'm trying to append this list to an HTML element using …

javascript arrays ecmascript-6 template-literals array.prototype.map
template literals in jsx

I want to use this but props <section class="slider" data-slick='{"slidesToShow": 3,"autoplay": true, "responsive": [{"breakpoint":600,"settings":{"slidesToShow": 2}}]}…

javascript reactjs babeljs template-literals
es6 multiline template strings with no new lines and allow indents

Been using es6 more and more for most work these days. One caveat is template strings. I like to limit …

javascript ecmascript-6 template-literals