WebStorm - “angular” is not defined

后端 未结 5 2110
庸人自扰
庸人自扰 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 08:03

    To make WebStorm (2016+) properly recognize angularjs and even enable code completion, simply go to:

    File > Settings
    

    Then on the left, select:

    Languages & Frameworks > JavaScript > Libraries
    

    Mark the checkbox next to 'angular' and click Apply. If angular does not appear in the list, you will need to click 'Add' and browse to wherever you have the library downloaded.

提交回复
热议问题