Intellisense for angular.js does not work in a javascript file

后端 未结 4 648
不知归路
不知归路 2021-02-06 08:33

I\'m using Visual Studio 2013 which supports Intellisense for Angular.js. Intellisense does indeed work when I create an Angular.js module within a script tag in a HTML5 file. H

相关标签:
4条回答
  • 2021-02-06 09:18

    If you develop NodeJs project, make sure you select right property for js file. "Build Action" should be equal to "Content", otherwise intellisense will not work

    Properties for js file

    0 讨论(0)
  • 2021-02-06 09:25

    Make sure you have a the uncompressed js file in your project. Visual Studio cannot read the intellisense from the minified js file

    0 讨论(0)
  • 2021-02-06 09:31

    Reference angular.js file on top of your JavaScript file like this:

    /// <reference path="../scripts/angular.min.js" />
    
    0 讨论(0)
  • 2021-02-06 09:32

    The javascript file needs a reference to angular js so it know what you're talking about. It looks like this:

    /// <reference path="ScriptFile1.js" />
    

    See here for more info http://msdn.microsoft.com/en-us/library/vstudio/bb385682.aspx

    0 讨论(0)
提交回复
热议问题