我是Angular 2中的新成员,我有一个自定义的CDN来加载我的Angular应用中的一些文件。我在我的index.html
加载此CDN,所有文件都是正确加载,但它返回这样的错误:在Angular 2中加载自定义CDN
Uncaught TypeError: undefined is not a function!
at module.exports (_a-function.js:2)
at module.exports (_ctx.js:4)
at _array-methods.js:24
at Array.map (es6.array.map.js:8)
at Array.toArray (prototype.js:1074)
at module.exports (_iter-define.js:39)
at Object.<anonymous> (es6.array.iterator.js:11)
at __webpack_require__ (bootstrap 8d27006…:52)
at Object.<anonymous> (array.js:22)
at __webpack_require__ (bootstrap 8d27006…:52)
发生的事情你知道吗?在index.html
中加载CDN是否正确?
感谢
尝试在脚本标记上添加'defer'属性。 – Jai
谢谢,但如果我使用'defer'属性它可以工作,但它不会加载文件。 – Crisiiii