0

I have installed webstorm and trying to create a simple angular js program.

I have created an empty project in webstorm, then added the angular.js file in libs directory. Then when I try to write code for angular js the auto completion is not working.

Here is the screenshot of the issue.

enter image description here

Please help me how to create angular js programs in webstorm?

Update:

Now I have added Angular JS as a dependency by following the steps Installing AngularJS Manually in JetBrains Doc. Also removed the angular js file from my project which was present as part of my 1st image in this post.

Even then I am not able to see the auto-completion working. I have verified that the angular js plugin is enabled in my webstorm. Please let me know what could be the issue?

Update:

I have plugin for Angular JS already enabled in my webstorm, please check below image:

enter image description here

learner
  • 6,062
  • 14
  • 79
  • 139
  • Why not create a project with a generator using Yeoman - http://yeoman.io/ That will give you a better app structure, build tools, package managers, unit tests... and your IDE should be better equipped for this. – Mike Sav Nov 19 '15 at 08:00

3 Answers3

0

Not really an answer (have you saved your HTML, why not put your JS code into external files)... but why not create a project with a generator using Yeoman - http://yeoman.io/ That will give you a better app structure, build tools, package managers, unit tests... and your IDE should be better equipped for this.

This may help too: http://blog.jetbrains.com/webstorm/2014/07/how-webstorm-works-completion-for-javascript-libraries/

Mike Sav
  • 14,805
  • 31
  • 98
  • 143
  • I don't know about yeoman, never tried that. I tried keeping the JS code in a separate JS file, but still same issue, auto-completion is not working. – learner Nov 19 '15 at 08:41
0

There is a AngularJs plugin for Webstorm. This will give you autocomletion in html files. See this tutorial how to install it: youtube tutorial

There is even a documentation page form JetBrains which explains how to creat a AngularJs Project: JetBrains Doc

YvesHendseth
  • 1,149
  • 1
  • 10
  • 27
  • I have followed the steps in the doc now, but still same issue, I have updated my post, can you please take a look. – learner Nov 19 '15 at 08:38
  • @user3181365 for autocompletion a plugin is required. See this doc to install a plugin in Webstorm: https://www.jetbrains.com/webstorm/help/enabling-and-disabling-plugins.html – YvesHendseth Nov 19 '15 at 08:47
  • already plugin is enabled in webstorm, added screenshot to my post, please check. – learner Nov 19 '15 at 10:42
0

Found in WebStorm doc

Configure AngularJS as a WebStorm JavaScript library, to let WebStorm recognize AngularJS-specific structures and provide full coding assistance: Open the Settings dialog box, and click JavaScript Libraries. In the Libraries area, click the Add button. In the New Library dialog box that opens, specify the name of the library. Click the Add button add next to the list of library files and choose Attach Files or Attach Directory on the context menu, depending of whether you need separate files or an entire folder. Select the Angular.js or Angular.min.js, or an entire directory in the dialog box that opens. WebStorm returns to the New Library dialog box where the Name read-only field shows the name of the selected files or folder. In the Type field, specify which version you have downloaded and are going to add. If you added Angular.js, choose Debug. This version is helpful in the development environment, especially for debugging. If you added the minified Angular.min.js, choose Release. This version is helpful in the production environment because the file size is significantly smaller.

Or check out this blog post

kartsims
  • 1,001
  • 9
  • 16