![]() ![]() ![]() This is the most common issue I find with PhpStorm/WebStorm. You can also do this via project settings in "Files / Settings / Directories"ģ) Ignore bundled output files for JavaScript In the Project Files panel in PhpStorm find the Angular packages, right click on those folders and "Exclude" those folders. You won't need any Angular JS files since you've already installed the TypeScript definitions (which work better for auto-completion). If you are using node_modules or bower_components then you need to include some of the JS files from those folders, but not unnecessary duplicates. It's an easy fix, but adds unnecessary source code to your project.Ģ) Disable JavaScript source files by excluding them There is less likely to be conflict with any already scanned JS source files that also declare angular. This will declare the variable myAngular using the TypeScript definition. This is true for most JS variables in Php/WebStorm not just this angular variable.ġ) Force type declaration with JsDoc to TypeScript /** If the tooltip says there are multiple definitions of the identifier, then it can not do autocomplete correctly. It should show it highlighted to be clickable, and a tooltip showing where it is declared. If you hold down ctrl and mouse over the world angular. This doesn't have anything to do with your actually JavaScript project, but where PhpStorm looks for declarations. It's important to verify that only 1 declaration for angular is being discovered by PhpStorm. The angular variable is a global one and when you have to many declarations of the same global variable PhpStorm/WebStorm can not handle auto-completion. Getting angularJS autcomplete in Webstorm/PHPStorm.Why do AngularJS directives (attributes, etc.) show up as "invalid" in WebStorm 8?.*I have already reviewed these links and SO posts: Also, I am new to angular, but my code is working. ![]() I have tried using different versions of PhpStorm and I have also tried using Angular 1.5 (the beta version) with the same result. Here is my code: var appModule = angular.module("appModule", ) ĪppModule.fac //This is me typing factory, but auto complete doesn't help ng-modal), but trying to do something like Module.fact does not autocomplete to factory. Added angular.js to the list of libraries in Phpstormĭirectives in my HTML will autocomplete fine (e.g.Downloaded the latest stable release of Angular (1.4.8).Installed both the AngularJS and NodeJS Plugins in Phpstorm. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |