简体   繁体   English

WebStorm无法识别我的自定义Angular.js指令

[英]WebStorm does not recognize my custom Angular.js directives

I am creating custom Angular.js directives but WebStorm 2017.1.2 does not recognize them: 我正在创建自定义Angular.js指令,但WebStorm 2017.1.2无法识别它们:

在此处输入图片说明

My WebStorm JavaScript library settings are like this: 我的WebStorm JavaScript库设置如下:

在此处输入图片说明

And Angular.js plugins are installed. 并安装了Angular.js插件。

I notice now a situation about this problem. 我现在注意到有关此问题的情况。 If I create a new project and new directives, WebStorm recognizes custom directives. 如果我创建一个新项目和新指令,WebStorm会识别自定义指令。 But I am working on a large project and custom directives are not recognized there. 但是我正在处理一个大型项目,并且那里没有识别自定义指令。

Is there special case for directives? 指令是否有特殊情况?

Do you have angular.js file (debug version, uncompressed!) in your project? 您的项目中是否有angular.js文件(调试版本,未压缩!)? Normally it's enough to get Angular directives/methods recognized. 通常,足以识别Angular指令/方法。 See http://blog.jetbrains.com/webstorm/2014/03/angularjs-workflow-in-webstorm/ , ' Include angular.js in Your Project ' section 请参阅http://blog.jetbrains.com/webstorm/2014/03/angularjs-workflow-in-webstorm/中的“ 在您的项目中包含angular.js ”部分

Note that angular typescript stubs ( angular-Definitely typed , etc.) won't work here, you need angular.js to enable AngularJS support 请注意, angular.js存根( angular-Definitely typed angular.js等)在这里不起作用,您需要angular.js才能启用AngularJS支持

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM