如何创建webstorm一个简单的角度JS项目 [英] How to create a simple angular js project in webstorm

查看:769
本文介绍了如何创建webstorm一个简单的角度JS项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了webstorm,并试图创建一个简单的角度JS程序。

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

我已经创建了webstorm一个空项目,然后加入库目录中的文件angular.js。然后,当我尝试写code为角JS的自动完成功能不能正常工作。

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.

下面是问题的截图。

在这里输入的形象描述

请帮我如何在webstorm创建角的js程序?

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

更新:

现在我已经通过以下步骤安装AngularJS手动中的 JetBrains的文件。还删除了我的项目这是present在这个岗位我的第一形象的一部分角js文件。

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.

即使是这样,我无法看到自动完成的工作。我已验证的角度JS插件是在我的webstorm启用。请让我知道可能是什么问题?

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?

更新:

我有插件角JS在我webstorm已经启用,请检查下面的图片:

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

在这里输入的形象描述

推荐答案

WebStorm DOC

配置AngularJS为WebStorm JavaScript库,让WebStorm识别AngularJS特定的结构和提供全面的编码辅助:
  打开设置对话框,然后单击JavaScript库。
  在库区域,单击添加按钮。
  在打开的新建库对话框,指定库的名称。
  点击添加按钮旁边的库文件列表,选择附加文件或上下文菜单上安装目录,这取决于你是否需要单独的文件或整个文件夹。
  选择Angular.js或Angular.min.js,或在打开的对话​​框中整个目录。 WebStorm返回到名称只读字段显示选定的文件或文件夹的名称,新图书馆对话框。
  在类型字段中,指定你下载的版本,并且将增加。
  如果添加Angular.js,选择调试。此版本是在开发环境很有帮助,尤其是进行调试。
  如果添加了缩小的Angular.min.js,选择释放。这个版本是在生产环境有益,因为该文件的大小是显著较小

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.

或检查出这篇博客文章

这篇关于如何创建webstorm一个简单的角度JS项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆