我试图在我的Meteor项目中实现jQuery DataTables,但我总是收到以下错误.有人可以告诉我我在这里错过了什么/做错了吗?以下是我的Meteor应用程序代码.谢谢.
Uncaught TypeError: Cannot set property 'pagesData' of undefined underscore.js:848
Error: Exception from Tracker recompute function:
Error: Can't call non-function: undefined
at Spacebars.call (http://localhost:3000/packages/spacebars.js?cb20740019f26bdca2faa89ba9c973f618118521:172:13)
at Spacebars.mustacheImpl (http://localhost:3000/packages/spacebars.js?cb20740019f26bdca2faa89ba9c973f618118521:106:25)
at Object.Spacebars.mustache (http://localhost:3000/packages/spacebars.js?cb20740019f26bdca2faa89ba9c973f618118521:110:39)
at null._render (http://localhost:3000/packages/jquery-datatables.js?bf10e73db3f8b2f4afdc77c33ba3c62092556ae7:1010:22)
at doRender (http://localhost:3000/packages/blaze.js?7b7ff7ee2ccdccd85a1ad0d8dc9d96193e29e8b0:1853:25)
at http://localhost:3000/packages/blaze.js?7b7ff7ee2ccdccd85a1ad0d8dc9d96193e29e8b0:1795:16
at Object.Blaze._withCurrentView (http://localhost:3000/packages/blaze.js?7b7ff7ee2ccdccd85a1ad0d8dc9d96193e29e8b0:2029:12)
at viewAutorun (http://localhost:3000/packages/blaze.js?7b7ff7ee2ccdccd85a1ad0d8dc9d96193e29e8b0:1794:18)
at Tracker.Computation._compute (http://localhost:3000/packages/tracker.js?192a05cc46b867dadbe8bf90dd961f6f8fd1574f:288:36)
at new Tracker.Computation (http://localhost:3000/packages/tracker.js?192a05cc46b867dadbe8bf90dd961f6f8fd1574f:206:10)
Run Code Online (Sandbox Code Playgroud)
Project.html - 客户端文件夹
<template name="projectslist">
<div class="projectslist">
<div>
{{> DataTable dtProjects }}
</div>
</div>
</template>
Run Code Online (Sandbox Code Playgroud)
Projectlist.js - 客户端文件夹
Template.projectslist.dtProjects = function() {
return {
id: "my-unique-table-id", …Run Code Online (Sandbox Code Playgroud)