I'm a beginner with Meteor and I'm currently working on the introductory tutorial. However, I'm facing difficulties in retrieving data from a collection.
Below is my JavaScript code:
import angular from 'angular';
import angularMeteor from 'angular-meteor';
import { Tasks } from '../../api/tasks.js';
import template from './todosList.html';
class TodosListCtrl {
constructor($scope) {
$scope.viewModel(this);
this.helpers({
tasks() {
return Tasks.find();
}
})
}
}
export default angular.module('todosList', [
angularMeteor
])
.component('todosList', {
templateUrl: 'imports/components/todosList/todosList.html',
controller: TodosListCtrl
});
Furthermore, I have defined my collection in the following manner (imports/api/tasks.js):
import { Mongo } from 'meteor/mongo';
export const Tasks = new Mongo.Collection('tasks');
I believe I might be overlooking something simple, and would appreciate any assistance offered.