how to delay interpolation of template strings?

Kevin Smith zenparsing at gmail.com
Tue Dec 16 07:57:41 PST 2014


>
>
> var template = compile`
> Hello ${{first_name}}
> `;
>

You'll get a ReferenceError because it has the object literal `{ first_name
}`, which is shorthand for `{ first_name: first_name }`, and there is
(presumably) no binding for `first_name`.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141216/47a916c9/attachment.html>


More information about the es-discuss mailing list