Getting angular documentation (intellisense) when writing Javascript? - angularjs

Ok so I've read Intellisense for angular.js does not work in a javascript file and googled and even installed https://resharper-plugins.jetbrains.com/packages/AngularJS/ (I have resharper).
I do have basic code completion of angular stuff when writing js, and the above extension gives nice code completion for html directives in the html files. However I'm wondering if there's anything that could give me real documentation on the fly, like intellisense does for C#, something that pops up and goes something like:
".directive - this method is used to define custom directives.
Parameters: directive name - a normalized string..."
etc.

I succeeded until getting intellisense but not documentation.
IN VS 2015 open Tools -> Options -> Text Editor -> JavaScript -> Intellisense -> References.
Under the Add section open "C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References" and add "angular.intellisense.js".
If you don't have "angular.intellisense.js" see the below articles to get the file.
http://bartwullems.blogspot.com/2015/02/angularjs-intellisense-in-visual-studio.html
https://blogs.msdn.microsoft.com/visualstudio/2015/02/05/using-angularjs-in-visual-studio-2013/

Related

Embedding a JavaScript File as a Resource in an Assembly in visual studio 2017

I'm unable to add reference of angular js file location in visual studio 2017 community as I usually do in visual studio 2015
Please check this: Can't drag AngularJS intellisense reference to code window
Van Kichline [MSFT]: With the new JavaScript language service these references are no longer required, so they aren't written to the file.
So we can know this behavior is by design, which means the reference line will not auto create, we can directly invoke the contents like function inside each .js file among the whole project, you can have a try with it, this works in my VS 2017.

Type Definition not getting fetched | Visual Studio Code

I recently started using Visual Studio Code. I was working on an angular project when i noticed VS Code simply won't download the definition for angular.
I can't even find the directory where the definitions are stored.
I click on Download type definition angular.d.ts but nothing happens. I keep getting squiggly under angular.
My VS Code version is 0.10.3.
I've tried manually putting the definition statement but it wont help either.
/// /// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/angularjs/angular.d.ts
from this source John Papa Quick Fix

Angularjs cannot find intellisense

I am using visual studio 2010. When i am going to install angularjs and Angularjs UI Bootstrap from Microsoft nuget. In my index page i already set angularjs.min.js reference but angularjs intellisense not working. Please help me
i had this issue.
The visual studio IDE will scan any js files referenced in the HTML files and use them if neccesary (for the intellisense etc).
My problem was i was referencing Angularjs using the CDN/http:// addresses and thus Visual studio did not have any information on angular.
Try downloading the angularjs js file directly and include in your project and reference in your index.html, rebuild (just in case) and try again and hopefully it should work.
Hope i helped.

Prefix headers in other IDEs than Xcode

The prefix header functionality in Xcode comes in handy quite often and I was wondering if other IDEs provide a similar functionality? Or is there even a way on compiler level?
I've been looking for this in other environments for quite a time and the only thing I could find were precompiled headers. But that's not really the same as you still need to include the header file in each source file.
So, does anyone know if there's a way to configure prefix headers in IDEs like Visual Studio or QT Creator?
For VC++ you can specify Forced Include File using option /FI on command line or through an IDE. An excerpt from MSDN:
To set this compiler option in the Visual Studio development
environment:
1. Open the project's Property Pages dialog box.
2. Click the C/C++ folder.
3. Click the Advanced property page.
4. Modify the Force Includes property.
For QtCreator you can add two lines to your *.pro file:
CONFIG += precompile_header
PRECOMPILED_HEADER = stdafx.h
Of course, you can type any name instead of "stdafx.h"

Resharper intellisense isn't working with generated file

I used the feature provided in the RIA Services Toolkit to automatically generated a service client to a WCF service when you build the project. The generated file is placed in ...\GeneratedWcfClientCode\ServiceReference.cs
The project compiles and runs successfully, however Resharper's intellisense isn't picking up that file and as a result is saying there are errors for the items defined in this file.
Is there anyway to force Resharper to recognize the generated file?
It appears it's because the client-side files generated by RIA aren't included as part of the Project.
I have just included the files from "Generated Code" in the solution and Reflector is happy once more. Not ideal, but should give you back your intellisense while the stars at JetBrains address this.
I have only ReSharper 5.1.
This version has settings for generated code, see ReSharper->Options->Code Inspection->Generated Code.
There you can add all files and folders that must not be touched by ReSharper. Maybe your file/folder is in that list and so your file/folder is ignored by ReSharper's intellisence.

Resources