WebStorm - “angular” is not defined

后端 未结 5 2107
庸人自扰
庸人自扰 2021-02-05 07:10

NOTE: This is a WebStorm issue, not an angular.js issue.

Screencast of the problem: http://f.cl.ly/items/302s0d1k1i3i1B2p0W09/ws703-angular-not-defined.mp4

Descr

5条回答
  •  借酒劲吻你
    2021-02-05 07:59

    Go to Settings > Plugins and download the AngularJS plugin for WebStorm. That's the first thing I did before using AngularJS with WebStorm, and I never saw that issue.

    Version 8 of WebStorm will have AngularJS fully baked in, but for now, that plugin should help.

    Edit: Ok, I think I may have found another possible solution. As you said, it's a WebStorm issue. There is no actual error in the code, it's just a code inspection. You can turn off this inspection like this:

    Go to settings > inspections > JavaScript > General and uncheck "unresolved JavaScript variable" and "unresolved JavaScript function".

    This should make the error go away. I found this while going through an AngularJS tutorial on Pluralsight.

提交回复
热议问题