Can anyone explain to me why I’m getting this error? Following the templating documentation, this should be correct syntactically.
“Cannot read property ‘onRendered’ of undefined”
main.js
import { Template } from 'meteor/templating'
import { Patients } from '../imports/patients.js'
import './main.html'
var dataSet;
Template.loadHelp.onRendered(loadLoinc());
.
.
.
function loadLoinc(){
Meteor.call('getLoincArray', function(err, res){
dataSet = res;
})
}
index.html
<head>
<title>patient-todo</title>
</head>
<body>
<template name="loadHelp">
</template>
<div class="container">
<h1 class="text-center">Patient Task Manager</h1>
.
.
.
</body>
For Reference: