获得以下错误
Tracker afterFlush函数的异常:undefined不是函数 TypeError:undefined不是函数
<head>
<title>Orion</title>
<link href="http://cdn-na.infragistics.com/igniteui/2014.2/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" />
<link href="http://cdn-na.infragistics.com/igniteui/2014.2/latest/css/structure/infragistics.css" rel="stylesheet" />
<!-- JavaScript Library Dependencies -->
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<script src="http://modernizr.com/downloads/modernizr-latest.js"></script>
<!-- Ignite UI Required Combined JavaScript Files -->
<script src="http://cdn-na.infragistics.com/igniteui/2014.2/latest/js/infragistics.core.js"></script>
<script src="http://cdn-na.infragistics.com/igniteui/2014.2/latest/js/infragistics.dv.js"></script>
<script src="http://cdn-na.infragistics.com/igniteui/2014.2/latest/js/infragistics.lob.js"> </script>
</head>
<template name="currencyData">
<div class="container">
<div id="gridChartContainer">
<table id="grid"></table>
</div>
</div>
Template.currencyData.rendered = function() {
if (this.find("#grid")) console.log("Found the grid");
this.find("#grid").igGrid({
width: "100%",
dataSource: currencyData,
autoGenerateColumns: true,
});
}
答案 0 :(得分:1)
发现调用问题......
将我的功能修改为如下所示
Template.currencyData.rendered = function() {
this.$("#grid").igGrid({
width: "80%",
dataSource: currencyData,
autoGenerateColumns: true,
});
}