将Angular2指令添加到Netbeans IDE [英] Add Angular2 instructions to Netbeans IDE
问题描述
我曾经在工作期间使用Netbeans.现在,我想开始使用Angular2.
I used to use Netbeans during my work. Now I want to start using Angular2.
我正在学习angular.io的教程.我已经创建了包含内容的模板HTML文件(仅相关行):
I'm following tutorial from angular.io. I've created template HTML file with content (only relevant line):
<div *ngFor="let hero of heroes" (click)="gotoDetail(hero)">
然后NB向我显示有关*ngFor
和(click)
的错误:
And NB shows me errors about *ngFor
and (click)
:
- 属性"* ngfor"无法实现为XML 1.0. (规则类别:属性)
- 属性(单击)"无法实现为XML 1.0. (规则类别:属性)
- 此时,元素"div"上不允许使用属性"* ngfor". (规则类别:元素)
- 此时,元素"div"上不允许使用属性(单击)". (规则类别:元素)
我如何教导NB那些是正确的?我已经安装了支持TypeScript的插件.
How can I teach NB that those are correct? I've already installed plugin to support TypeScript.
在测试项目中,我下载了节点包:
In my test project I downloaded node packages:
c:\proj> npm list --depth=0
angular2-quickstart@1.0.0 C:\a2
+-- angular2@2.0.0-beta.17
+-- concurrently@2.0.0
+-- es6-shim@0.35.0
+-- lite-server@2.2.0
+-- reflect-metadata@0.1.2
+-- rxjs@5.0.0-beta.6
+-- systemjs@0.19.26
+-- typescript@1.8.10
+-- typings@0.8.1
`-- zone.js@0.6.12
推荐答案
不幸的是,NetBeans不支持Angular 2模板语法,因此您将收到(错误的)警告/错误,并且不支持代码完成功能. 您可以使用TypeScript插件和类型来获得对应用程序的TypeScript/JavaScript部分的支持.随时随请求打开NetBeans问题,我也将对此投票.
Unfortunately NetBeans does not support Angular 2 template syntax, so you will receive (wrong) warnings/errors and no codecompletion support. You can use the TypeScript plugin and typings to get support for the TypeScript/JavaScript parts of the application. Feel free to open a NetBeans issue with the request, I will vote for it as well.
已经存在要求该功能的问题: https://netbeans.org/bugzilla/show_bug.cgi?id = 257587 如果您投票赞成,它可能会实现.
There is already an issue filed to request that feature: https://netbeans.org/bugzilla/show_bug.cgi?id=257587 if you upvote it, it might get implemented.
这篇关于将Angular2指令添加到Netbeans IDE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!