Bug 257587 - Add Angular2 support
Add Angular2 support
Status: NEW
Product: web
Classification: Unclassified
Component: AngularJS
8.2
PC All
: P1 with 35 votes (vote)
: Next
Assigned To: Roman Svitanic
Vladimir Riha
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-15 15:04 UTC by everflux
Modified: 2017-08-07 14:12 UTC (History)
5 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Screenshots of Angular 2 validation issues (262.76 KB, application/x-zip-compressed)
2016-03-22 12:04 UTC, Maiakaat
Details
HTML template errors (15.23 KB, image/png)
2016-05-04 13:55 UTC, pkoral
Details

Note You need to log in before you can comment on or make changes to this bug.
Description everflux 2016-01-15 15:04:38 UTC
Now that Angular2 is in beta and the API should be fairly stable it would be great if NetBeans could support Angular2 along with the upcoming ES6 support in NetBeans.
Comment 1 Maiakaat 2016-03-22 12:04:11 UTC
Created attachment 158965 [details]
Screenshots of Angular 2 validation issues

Zip containing four screenshots of validation issues in Netbeans with Angular 2

The IDE is Netbeans IDE 8.1
Comment 2 Maiakaat 2016-03-22 12:08:49 UTC
After beginning tutorials for Angular 2, I have added some screenshots of issues in how Netbeans validates files incorrectly for Angular2 with Typescript

The IDE has a custom TypeScript Plugin to help with File creation (optional compiling/transpiling) and syntax highlighting issues, but code validation issues are widespread, and changes are needed in the HTML validator (custom tags provided by Angular.js/.ts code is marked as invalid) as well as the way JavaScript and JSON files are validated, including widespread complaints about code within common node_modules
Comment 3 Maiakaat 2016-03-23 12:36:23 UTC
A Further issue is that the node.js templates create a public directory, but both the live-server and lightweight Netbeans server fail to find the node_modules without undefined modifications as they are in a parent folder*

This is possibly unless bower init is executed (but I cannot be sure of the causes of when it works inside public, and when it doesn't work inside public)

It's difficult to understand the behaviour completely, as to why in some cases it has worked but by default it doesn't even using the netbeans project templates with the npm package manager

This is Netbeans 8.1 on Windows 10 x64
Comment 4 everflux 2016-05-04 13:48:38 UTC
With the existing TypeScript community plugin the most important feature would be template syntax support.
If ES6 should be supported as well, adding support for the angular2 libraries would be required as well, but it looks like TypeScript is the lingua franca for Angular 2.
Comment 5 pkoral 2016-05-04 13:55:18 UTC
Created attachment 159534 [details]
HTML template errors
Comment 6 pkoral 2016-05-04 13:56:16 UTC
Also there are validation errors for Angular's commands in html templates - please see attachment.
Comment 7 ChrisLE 2016-10-14 07:43:57 UTC
Have exact the same problem, if you support angular2 for JS, please support Angular2 in HTML too. Both works hand in hand. I can add such attributes to the custom.json file but the errors will not disappear.
Comment 8 pekarna 2016-12-12 20:48:20 UTC
I would be happy even with just the templates being properly highlighted.
Comment 9 DaltonNotetech 2016-12-14 09:22:22 UTC
Add support for angular 2 templates (remove errors and make sure that format operation works correctly)
Add in-build support for Typescript 2
Add support for webpack 2
Add support for running nodejs project inside java web application.
Comment 10 ChrisLE 2016-12-16 15:24:11 UTC
(In reply to DaltonNotetech from comment #9)
> Add support for angular 2 templates (remove errors and make sure that format
> operation works correctly)
> Add in-build support for Typescript 2
> Add support for webpack 2
> Add support for running nodejs project inside java web application.

Please create separate tickets for webpack 2 and the nodejs thing for java web apps, this has nothing todo with this ticket and should be separate.

Here you can find the TypeScript plugin: https://github.com/Everlaw/nbts. This brings TypeScript to NetBeans, if you have problems or feature requests, please file tickets there.
Comment 11 ms2701 2017-01-05 08:37:45 UTC
I use the TypeScript Plugin in combinement with gulp to generate source-mapping files. Works good but I see some lacks...

1) Missing debugger support
You can start the debugger, but there is no connection/mapping to the original .ts file. So if you need that, you have to use an external tool, for example Chrome browser.

2) tsconfig.json location limitations
You have to locate tsconfig.json in the source folder of the *.ts files. That's for my point of view the wrong place, because it is part of the build configuration and not part of the project sources.

My recommendation would be:
a) create a subfolder 'src' fpr the *.ts files
b) locate tsconfig.conf in the project base directory (same location like files gulpfile.js, ...)
c) show the files under the category "Important Files" (like gulpfile or package.json)
Comment 12 ChrisLE 2017-01-05 08:59:42 UTC
(In reply to ms2701 from comment #11)
> I use the TypeScript Plugin in combinement with gulp to generate
> source-mapping files. Works good but I see some lacks...
> 
> 1) Missing debugger support
> You can start the debugger, but there is no connection/mapping to the
> original .ts file. So if you need that, you have to use an external tool,
> for example Chrome browser.
> 
> 2) tsconfig.json location limitations
> You have to locate tsconfig.json in the source folder of the *.ts files.
> That's for my point of view the wrong place, because it is part of the build
> configuration and not part of the project sources.
> 
> My recommendation would be:
> a) create a subfolder 'src' fpr the *.ts files
> b) locate tsconfig.conf in the project base directory (same location like
> files gulpfile.js, ...)
> c) show the files under the category "Important Files" (like gulpfile or
> package.json)

The TypeScript plugin is a 3rd-party-plugin. Please file those bugs here as 3 different tickets: https://github.com/Everlaw/nbts/issues
Comment 13 ms2701 2017-01-05 13:16:16 UTC
Ok. See..
  https://github.com/Everlaw/nbts/issues/9
  https://github.com/Everlaw/nbts/issues/21
  https://github.com/Everlaw/nbts/issues/28

But it would make sense to include the ability to handle TypeScript, ... in the official HTML 5 Kit of Netbeans (maybe version 9). In the mean time many thanks to the maintainer of the 3-rd-party-plugin.
Comment 14 ChrisLE 2017-01-05 13:19:32 UTC
There was a internal discussion about to implement TypeScript natively into NetBeans but I don't know how it ends. And the problem is who will maintains it? ;) So we will see.
Comment 15 everflux 2017-01-05 13:25:31 UTC
The TypeScript support by everlaw is 'ok', I think it is great that they use the official Microsoft backend so maintenance burden is shifted (at least somewhat) towards the outside.
But this is only part of the picture: TypeScript alone is not sufficient for Angular development or other extension toolkits/frameworks/libraries: Accessing variables/types inside html templates, code completion etc. would be required to be at least somewhat on par with other IDEs. I really believe TypeScript, Angular are the most important building blocks for web development during the foreseeable future.
Comment 16 aphzol 2017-01-08 06:35:02 UTC
Please we need NetBeans to fully support Angular2 code without showing error. Other functionalities are great.
Thanks
Comment 17 DaltonNotetech 2017-01-09 06:02:09 UTC
At least add the following features as a quick fix.

Please automatically add all core angular attributes/tags to customs.json so that angular templates become error free. Also make sure that addition of custom element/attribute does not cause any formatting issue (Not format operation is not working properly with custom elements/attributes).
Comment 18 pekarna 2017-02-20 04:13:33 UTC
Sorry NB, had to switch to switch to IJ after like 10 years, the effectivity matters. I'll love to see Angular 2 & improved TS support in NB.
Sorry for cluttering bugzilla with this unhelpful comment but take it as "this is #1 priority for some" :)
Comment 19 ChrisLE 2017-02-23 10:30:22 UTC
This is really a pain in the ass to have the HTML fully in red somtimes if you use the angular2 syntax.
Comment 20 everflux 2017-04-10 09:06:10 UTC
I assume this issue would be best implemented using the language server protocol as there is language server support for both TypeScript (imho used by the everlaw plugin for NBTS) and Angular template syntax support as well.

* http://langserver.org/
* https://github.com/angular/vscode-ng-language-service
Comment 21 Rahul.khandelwal 2017-05-11 09:27:04 UTC
Angular 4 is already released and pretty soon people will start migrating to it.
Netbeans should get the support for Angular's latest version ASAP along with typescript as it will help Netbeans to get wider user base.
Java EE + Angular can be very good stack if netbeans can support Angular in better ways.
Comment 22 bilaco 2017-06-05 16:57:39 UTC
(In reply to ChrisLE from comment #19)
> This is really a pain in the ass to have the HTML fully in red somtimes if
> you use the angular2 syntax.

Indeed
Comment 23 ChrisLE 2017-08-07 14:12:48 UTC
I created a ticket here: https://issues.apache.org/jira/browse/NETBEANS-50 maybe we should close this ticket? I didn't follow the whole ticket, but what I can say, it is more or less about the syntax errors in html files, right? Maybe code completion for keywords in angular. So please create an other ticket there and feel free to discuss it in my ticket.


Regards


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo