I am stuck on step 5 update and remove for the To Do List app tutorial


#1

I am very new to meteor and building apps, when I follow the tutorial sometimes when I enter the new item on the list it is listed below and other times it is only added to the local:3000 url.

Here is where I am up to:
http://imgur.com/aCwMMlS

I would appreciate anyone who can take a look and see what I’ve done wrong.


#2

Do you have data in your collection but you cannot display it right now or you cannot insert any data into your collection? Have you checked both terminal and browser’s console to see if there is an error?


#3

I Have data in my collection from when it was displaying correctly in earlier steps, I am not getting any errors displaying in the terminal or browser. I am getting a visual error where the “()” is added after the Header.


#4

I checked with your code, your task.js file is like this:

import { Template } from 'meteor/templating';
 
import { Tasks } from '../api/tasks.js';
 
import './task.js';
import './body.html';

Template.task.events({
.....

so you imported task.js instead of task.html, that’s why in the browser I had the following errors:

instead of importing task.js, import task.html and that should solve this problem with the view


#5

Just had a quick look at your repo and you have some code in there from later steps.

E.g. This code in body.html is not added until step 7.
<h1>Todo List ({{incompleteCount}})</h1>

Has you code got out of sync somehow?


#6

Hello,

Thanks so much this is where the error was.
As I said I’m pretty new to this so your help is really appreciated.


#7

Hi
Thanks, this was causing the visual error issue, I think I was just going ahead as planned without really checking through each step. I’ve got lots to work on for understanding each step and the structure but I’m also trying to gain an understanding of the whole creation process right now.