lundi 13 juin 2016

How can I include an HTML <template> element within a Meteor Blaze Template?

I'm using Meteor, but would like to use some vanilla javascript/HTML code that uses the htlm template element.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template

When I try to include one inside a meteor template:

<template name="test2">
    <template id="test3">Some stuff i will clone in javascript</template>
</template>

Meteor displays the following error:

While processing files with templating (for target web.browser):
client/index.html:153: Expected one of: <body>, <head>, <template>

Is there a way to include these in a Meteor template? I am aware I can include them within the body tag but its a bit unwieldy.

Aucun commentaire:

Enregistrer un commentaire