How to get AngularJS Intellisense in Visual Studio 2015 - angularjs

I am using VS2015 Enterprise. In which I have created MVC Project and added file named "angular.min.js" downloaded from angularjs.org but Angular intellisense is not working. Although I have referenced this file in my custom javascript file named "AngularScript.js" as shown in figure.

The most easiest way to get intellisense is to install angularjs package from "Manage Nuget Packages" as shown in figure below.
just install this package and this will resolve all your issues regarding intellisense and other. Do this and enjoy the AngularJS intellisense in your application. :-)

Related

Error creating a project using HSPI template

I followed "Project templates for Visual Studio 2015 and Visual Studio 2017", but when I create a project using the template, I get following error:
Package Installation Error
The preinstalled packages have a reference to a missing Extension.
Could not find an Extension with ID 'HomeSeerTemplates.Alex Dresko.82028f47-9623-4359-a6bf-244390c19608'.
Long story short, try uninstalling the extension and reinstall it. I apologize for the inconvenience, but you shouldn't have to do that again. I goofed a couple weeks ago and messed some things up. Let me know if the new version of the extension works.
https://marketplace.visualstudio.com/items?itemName=thealexdresko.HomeSeerTemplates2

Only 'amd' and 'system' modules are supported alongside --out error in visual studio 2015

I want to combine Angularjs and TypeScript in a asp.net web api, so I try this blog post: LINK
when I run my application I encounter whit this error:
Error Build:Only 'amd' and 'system' modules are supported alongside --out.
I tried this post and install both of Microsoft.TypeScript.MSBuild and Microsoft.TypeScript.Compiler, but it still stops with that error.
so I try this post, but I don't know how to modify tsconfig.json because it uses visual studio code and I use visual studio 2015.
can you help me?
thanks
Choose "none" in the TypeScript module type under the project (.csproj) properties -> TypeScript Build.
In Visual Studio 2015, the TypeScript Build tap seems to have an issue. When selecting "none", it does not always work. I got it to work by unloading the project and editing the following entry manually in the .csproj file.
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptJSXEmit>None</TypeScriptJSXEmit>
<TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
<TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
<TypeScriptModuleKind>None</TypeScriptModuleKind> <----- Set this value to None
<TypeScriptRemoveComments>False</TypeScriptRemoveComments>

HotTowel.Angular.Breeze for Visual Studio 2015

I hope you can help me.
I am busy following the John Papa course - Building apps with angular and breeze -
(http://www.pluralsight.com/courses/build-apps-angular-breeze), but pretty early on in the course I am getting issues with installing HotTowel.Angular.Breeze via NuGet. It seems there is some incompatibility issue with to$q and to%24q.
I get the following error: 'C:\Users\Admin.nuget\packages\HotTowel.Angular.Breeze\2.3.3\content\scripts\breeze.to%24q.shim.js'.
I am using Visual Studio 2015, and the only real solution I found was to move to VS 2013. But I am certain there must be a better solution or workaround.
I really appreciate all your help!
The solution:
I downloaded the source packages contained in the source files of the specific project on GitHub.
I then set a new Package Source in VS2015 pointing to the downloaded compatible packages, and installed it via that location.

Visual Studio 2013 protractor intellisense

First of all, I am very beginner in using node.js / angualar.js /protractor.js and jasmine.js stuff and I am not from web dev corner at all.
But for now, I just want to create some protractor test for an angular app and this is actually working quite fine. But I am wondering if it's possible to get VS2013 intellisense working?
I would really appreciate if VS would suggest functions of objects like 'browser.xxx'.
I am really stuck with that, looking forward for some hints!
thx Florian
Ill just give an answer to myself! To get Visual Studio 2013 intellisense and debugging working for angular protractor tests, follow these steps:
Install node.js
Install protractor (global) („npm install -g protractor“; „webdriver-manager update“)
Install Visual Studio 2013 node.js Tools
Install Visual Studio 2013 TypeScript Tools
Create a new project „Typescript\Node.js\Blank Node.js Console Application“
Add your „conf.ts“ and „spec.ts“ files to the project
Right click on „conf.ts“ and select „Set as node.js startup file“
In „Project properties“ set your „Node.exe path“ to your protractor executeable file, eg. „C:\Users\myUser\AppData\Roaming\npm\protractor.cmd“
Download typescript DefinitelyTyped definitions from git hub:
https://github.com/borisyankov/DefinitelyTyped
In your VS2013 project folder „Scripts\Typing“ create the subfolders „jasmine“, „protractor“ and „selenium-webdriver“
Add the typing definition files "angular-protractor\angular-protractor.d.ts", "jasmine\jasmine.d.ts" and "selenium-webdriver\selenium-webdriver.d.ts" into the appropriate project folders you created in the step above.
Write your protractor test and enjoy code highlighting
Start webdriver-manger „webdriver-manager start“
Hit „F5“ to start debugging
Enjoy!
Florian

Angularjs - Resharper intellisense broken with TypeScript?

I have VS 2013 Update 4, TS 1.4, latest WebEssentials and R# 8.
I am trying to create some AngularJS code in my MVC solution.
In installed Angularjs and angular.d.ts via nuget. I have done the same for "marked" and also jQuery installed automatically as Angular dependency.
How, none of Angular types get resolved by Intellisense. If I am trying to type "mar" in an empty TypeScript file I get this:
If I type "jque" I get this:
But when I type "ang" - nothing.
All d.ts files are in place:
Adding reference path directive does not help, although it is not required and Intellisense works perfectly fine for other frameworks. Manual typing without Intellisense support works fine and I get no compilation errors, so TSLint and tsc are ok with my code.
So, my question is - what is going on there?
P.S. Just added Knockout to test this and typing "ko" brings proper Intellisense.
P.P.S. I turned off the TS support in R# and intellisense seems to work properly. So, I would assume this is the Resharper issue.
I turned off the TS support in R# and intellisense seems to work properly. So, I would assume this is the Resharper issue
Yes. They need to update for v1.4 of typescript. You can use an older angular.d.ts till then : https://github.com/borisyankov/DefinitelyTyped/blob/1.3.0/angularjs/angular.d.ts
As basart mentioned, rather than installing EAP or turning Resharper off, you can use an older version of the file for the interim period. But I advise against adding it manually in your solution. Version 1.7.4 of jQuery d.ts and version 2.4.0 of Angular d.ts worked for me and you can use NuGet from the Package Manager command line in Visual Studio to install them.
Install-Package jquery.TypeScript.DefinitelyTyped -Version 1.7.4
Install-Package angularjs.TypeScript.DefinitelyTyped -Version 2.4.0
Make sure you select your project in the dropdown box inside the console before running the command.
I had this problem a little earlier today, where inline intellisense was flagging angular, as well as various interfaces (usually IPromise<T>) as not being found, despite having reference metacomments and the files present in my project.
Similar to the answer from #basarat, I was able to disable ReSharper Intellisense (Resharper | Options... | Intellisense | General), restart Visual Studio, and then re-enable TypeScript Intellisense. Upon re-enabling intellisense, I no longer get red squigglies.
I did this in Visual Studio 2015, ReSharper 2016.3.2, on a project that is using Angular 1.6 and TypeScript together, with no tsconfig.json file (configuration is done in the TypeScript tab of the Web project.)

Resources