错误:无法实例化模块restangular原因是:“

编程入门 行业动态 更新时间:2024-10-25 04:25:03
本文介绍了错误:无法实例化模块restangular原因是:“_”未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在首先使用工作网站上Restangular我得到了以下JavaScript错误:

When first using Restangular on a working website I got the following JavaScript error:

未能实例化模块restangular原因是:_未定义

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

我在想什么?这是什么意思是'_'是不确定的(在Restangular模块)?

What am I missing? What does it mean that '_' is undefined (in the Restangular module)?

推荐答案

这是一个简单的监督。该_(下划线)是Restangular使用和依赖于一个JavaScript工具库。包括 Lodash 或 Undrescore 的AngularJS库之前库(在你的HTML):

It's a simple oversight. The '_' (underscore) is a JavaScript utility library that Restangular uses and depends on. Include Lodash or Undrescore library before the AngularJS library (in your HTML):

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

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

PS:仔细检查库脚本和路径存在在你的脚本标记引用

PS: Double check the library script and path exist as referenced in your SCRIPT tag.

其他读数:

  • Restangular依赖
  • 为什么Restangular不依赖于lodash /下划线
  • lodash之间
  • 差异凸显
  • Restangular Dependencies
  • Why Does Restangular Depend on lodash / underscore
  • Differences between lodash and underscore

更多推荐

错误:无法实例化模块restangular原因是:“

本文发布于:2023-07-05 07:03:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1034459.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:实例   模块   错误   原因   restangular

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!