vendredi 30 juin 2017

Cannot find a differ supporting object '[object Object]' of type 'object' , Error in meteor Collections

I am new to angular. I am following Course for angular2. I am trying to make a web application with angular and meteor js.

My browser reporting the error Cannot find a differ supporting object '[object Object]' of type 'object'

I have a mongo collection defined:

import {Mongo} from 'meteor/mongo';
export let Bookmarks = new Mongo.Collection('bookmarks');

And I am using fetching records from the collection in my component.ts file

import { Component } from '@angular/core';
import template from './bookmarklist.html';
import {Bookmarks} from '../../../../collections/bookmarks';
import {Mongo} from 'meteor/mongo';


@Component({
  selector: 'bookmark-list',
  template: template
})
export class BookmarkList {
bookmarks : Mongo.Cursor<Object>;

constructor(){
    this.bookmarks = Bookmarks.find();
    console.log(this.bookmarks);
   }
}

Not sure where is the problem. I can retrieve record from the meteor mongo console...

Meteor Mongo Console




Aucun commentaire:

Enregistrer un commentaire