gpt4 book ai didi

javascript - Uncaught ReferenceError : _ is not defined from restangular

转载 作者:可可西里 更新时间:2023-11-01 01:21:24 25 4
gpt4 key购买 nike

我收到此错误:Uncaught ReferenceError: _ is not defined from restangular 尝试使用 Restangular 时。

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js"></script>
<script type="text/javascript" src="http://cdn.jsdelivr.net/restangular/latest/restangular.min.js"></script>
<script src="app.js"></script>
<script src="controllers.js"></script>

app.js

var contactManager = angular.module('contactManager', ['restangular'])
contactManager.config(function(RestangularProvider){
RestangularProvider.setBaseUrl('/api/');
})

最佳答案

您需要添加对下划线的脚本引用,作为依赖

 <script src="https://cdn of underscore"></script>

关于javascript - Uncaught ReferenceError : _ is not defined from restangular,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17283622/

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