Hello it’s my first topic !
I followed the tutorial for the todo list.
But I wanted to add features (and trying some things).
My problem is the template is not rendering.
Here is my code :
'test.js'
import { Template } from 'meteor/templating';
import "./test.html";
Template.body.helpers({
tasks: [
{ text: "This is task 1" },
{ text: "This is task 2" },
{ text: "This is task 3" },
],
});
'test.html'
<template name="Entrainement_Home">
<body>
<div class="container">
<header>
<h1>Todo List</h1>
</header>
<ul>
{{#each tasks}} {{> task}} {{/each}}
</ul>
</div>
</body>
</template>
<template name="task">
<li>{{text}}</li>
</template>
and my route:
FlowRouter.route("/entrainement", {
name: "Entrainement.home",
action() {
BlazeLayout.render("App_body", { main: "Entrainement_Home" });
},
});
I get the h1 Todo List, but not the list:
where is my mistake ?
Nico