Open jannon opened 8 years ago
I also have this problem, doing tutorial step-by-step... (Angularjs todos)
I have the same issue - Meteor todos Tutorial
I guess the reason is that you'r created that task from meteor-mongo console. For some reason it creating object instead of string. I have same issue
I'm having the same issue. I can confirm @massanchik guess. I'm doing the blaze tutorial, but that is irrelevant since the issue is with the MongoDB not the templating engine.
Below is a view from Robomongo 0.8.4 of the tasks collection, notice how documents 1-3 show ObjectId("[id]")
as the Key
field.
I had a similar issue, afterwards I discovered it related to items created before that change. To solve, delete all existing records.
'meteor mongo' 'db.tasks.remove( { } )'
Ok, this seems to be MongoDB's standard behaviour if the _id
field is not specified whe inserting the document (record).
Delete all records before starting this step.
meteor mongo
db.tasks.remove( { } )
_id
when inserting records, or
I'm just going through the Angular tutorial and encountered an error after completing step 9, switching to methods for security. The error is as follows:
Exception while invoking method 'tasks.setChecked' Error: Match error: Expected string, got object
The following code was added in step 9:
Basically, it considers
taskId
(passed in astask._id
) to be an object instead of a String so the check fails. Commenting out the check eliminates the error.So (1) something might need to be changed in the tutorial and (2) why does it fail on the
setChecked
method, but not on theremove
method?