加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs – WebStorm – “角”未定义

发布时间:2020-12-17 08:05:52 所属栏目:安全 来源:网络整理
导读:注意:这是一个WebStorm问题,而不是angular.js问题。 Screencast的问题:http://f.cl.ly/items/302s0d1k1i3i1B2p0W09/ws703-angular-not-defined.mp4 描述: 我的index.html文件中有以下内容: script src="vendor/js/angular.min.js"/scriptscript src="ap
注意:这是一个WebStorm问题,而不是angular.js问题。

Screencast的问题:http://f.cl.ly/items/302s0d1k1i3i1B2p0W09/ws703-angular-not-defined.mp4

描述:

我的index.html文件中有以下内容:

<script src="vendor/js/angular.min.js"></script>
<script src="app/js/scratch.js"></script>

在scratch.js中,当我引用“角”时,我不断得到这个来自JSHint的“角度没有定义”的消息。如何让它如此被定义在这个文件中,所以JSHint停止抱怨呢?这是配置问题吗?请指教。

WebStorm v7.0.3 / Mac OSX v10.9.1

documentation page of JSHint的第一个例子如下:

Configuration file is a simple JSON file that specifies which JSHint options to turn on or off. For example,the following file will enable warnings about undefined and unused variables and tell JSHint about a global variable named MY_GLOBAL.

{
  "undef": true,"unused": true,"globals": { "MY_GLOBAL": false }
}

替换MY_GLOBAL有角度,你不会再有这个JSHint警告了。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读