Tagged: Angular 2 Eclipse Oxygen default
This topic contains 6 replies, has 2 voices, and was last updated by 7 months ago.
April 30, 2018 at 7:46 pm #583618
My working environment is Eclipse Oxigen with Webclipse plugin for development with Angular. The default version is Angular 5, but I need working with Angular 2. How can I configure IDE for working with Angular 2 by default?.
Marco Antonio Mora GodoyMay 1, 2018 at 12:50 am #583740
Our Angular tools integrate the Angular CLI and there is no way to specify version 2 of Angular when creating a new project (the
ng newcommand is used to create an Angular project). Unfortunately, the only way to specify a specific version of Angular is to create the project and then manually alter the package.json file to specify appropriate versions of the packages for the version of Angular you want to use, then execute
npm installto update the packages.
However, you could create a starter package.json file yourself and overwrite the generated file with this starter file. Alternatively, you could create a dummy Angular version 2 project by hand and then import and rename this each time you want to create a new project. I realise this may not be the answer you were looking for but I’m afraid there is currently no way to automate this.May 15, 2018 at 9:41 am #586254
Thank you for your complete answer. Finally I imported an Angular 2 project with the IDE, but I can’t run it because the menu option for it is missing.
I shared you a Google Drive folder named ‘Angular 2 project can`t be run’ at the following URL:
Inside this folder are the imported Angular 2 project and a snapshot IDE showing the missing option for run it as Angular app.
Marco Antonio Mora GodoyMay 17, 2018 at 3:05 am #586522
Your project is not an Angular-CLI project. It seems to be similar, in structure, to an AngularJS project. In an Angular project, the
appfolder is under a
srcfolder. We user Angular-CLI in our Angular tooling, so the Angular-CLI dependency also needs to be there. These are likely two of the reasons that the project doesn’t appear in the Angular-CLI list inside the Servers view and why you would not be able to run it (as that requires Angular-CLI).
Note that some versions of Angular-CLI may not support version 2.0.0 of the angular node modules, which is the version you’ve specified in your project. So you may need to adjust versions of various modules to get matching dependencies for an Angular version 2 project that is also a valid Angular-CLI project. I’m afraid we can’t help further with development issues but please let us know if you see other tooling-specific issues.May 17, 2018 at 2:13 pm #586617
Finally I upgraded the project into Angular 4 using QuizzManiac template. I suggest to Genuitec delivering later an upgrade to Webclipse IDE, in order of adding at New Angular Project wizard a new option for choose the Angular version (2, 4, 5, or 6), for automatizing the library configuration and Angular-CLI, avoiding make it by hand.
Marco Antonio Mora GodoyMay 18, 2018 at 4:02 am #586683
I’m glad you finally managed to get a valid sample project, though it is now at a higher version than you originally wanted. I have communicated to development the possibility of adding the capability you suggested though this is the first such request we’ve seen. If we see more interest in such a facility, we’d likely prioritize it higher. You might also want to raise the issue with the Angular-CLI developers. There is an issues tab on the project page for Angular-CLI.May 18, 2018 at 8:57 am #586755
Thank you for support to my suggest!! :-D. I’ll post later a issue on the project page for Angular-CLI with my suggest too.
Marco Antonio Mora Godoy