Uncaught TypeError:无法使用Angularjs读取未定义的属性'Spread' [英] Uncaught TypeError: Cannot read property 'Spread' of undefined with Angularjs
问题描述
我有一个AngularJS项目,其中集成了SpreadJS.我通过gulp动态加载js和css文件,这些都很好地加载到了我的主要index.html文件中.但是,当我第一次尝试创建新的电子表格"时,出现此错误:
I have an AngularJS project where I'm incorporating SpreadJS. I dynamically loading teh js and css files through gulp and these are loading into my main index.html file good. However when I try creating a new "spreadsheet" for the first time I get this error:
angular.gc.spread.sheets.10.0.0.min.js:41未捕获的TypeError:无法读取未定义的属性"Spread"在angular.gc.spread.sheets.10.0.0.min.js:41在angular.gc.spread.sheets.10.0.0.min.js:1107
angular.gc.spread.sheets.10.0.0.min.js:41 Uncaught TypeError: Cannot read property 'Spread' of undefined at angular.gc.spread.sheets.10.0.0.min.js:41 at angular.gc.spread.sheets.10.0.0.min.js:1107
现在,我已经删除了用于生成电子表格的html和控制器代码,但是错误仍然存在,因此似乎我没有正确添加引用.在我的应用程序模块中,我认为模版定义中添加了''gcspreadsheets':
Right now I've removed the html and controller code for generating teh spreadsheet, but the error persists so it seems I didn't add the reference correctly. In my app module I juts added ' 'gcspreadsheets' as part of the modue definition:
angular.module('sp', [
'gcspreadsheets'
])
再次将它们添加到index.html的开头:
And again I have added these in the head of my index.html:
<script src="/libs/spreadjs/angular.gc.spread.sheets.10.0.0.min.js"></script>
<script src="/libs/spreadjs/gc.spread.sheets.all.10.0.0.min.js"></script>
是否想到了为什么会这样?我现在使用的是试用版,然后再购买.
Any thoughts of why this could be coming? I'm using the trial version for now prior to buying.
推荐答案
请切换脚本引用的顺序
希望这会有所帮助
这篇关于Uncaught TypeError:无法使用Angularjs读取未定义的属性'Spread'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!