gpt4 book ai didi

javascript - 错误 : Failed to instantiate module restangular due to: '_' is undefined

转载 作者:技术小花猫 更新时间:2023-10-29 12:01:10 26 4
gpt4 key购买 nike

当第一次在工作网站上使用 Restangular 时,我收到以下 JavaScript 错误:

Failed to instantiate module restangular due to: '_' is undefined

我错过了什么? “_”未定义(在 Restangular 模块中)是什么意思?

最佳答案

这是一个简单的疏忽。 '_'(下划线)是 Restangular 使用的 JavaScript 实用程序库,depends上。包括LodashUndrescore AngularJS 库之前的库(在您的 HTML 中):

<script src="lodash.js"></script>

<script src="underscore.js"></script>

PS:仔细检查您的 SCRIPT 标签中引用的库脚本和路径是否存在。

补充阅读:

关于javascript - 错误 : Failed to instantiate module restangular due to: '_' is undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20408290/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com