Tagged: Angular 2 Eclipse Oxygen default
- This topic has 6 replies, 2 voices, and was last updated 6 years, 7 months ago by morilla7771.
-
AuthorPosts
-
morilla7771ParticipantHi:
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?.
Best Regards,
Marco Antonio Mora Godoy
support-tonyKeymasterMarco,
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 new
command 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 executenpm install
to 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.
morilla7771ParticipantHi Tony:
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:
https://drive.google.com/open?id=14UeW1mqjljSTWFLDKR7QrRnmPpLfFHcv
Inside this folder are the imported Angular 2 project and a snapshot IDE showing the missing option for run it as Angular app.
Best Regards,
Marco Antonio Mora Godoy
support-tonyKeymasterMarco,
Your project is not an Angular-CLI project. It seems to be similar, in structure, to an AngularJS project. In an Angular project, the
app
folder is under asrc
folder. 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.
morilla7771ParticipantHi Tony:
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.
Best Regards,
Marco Antonio Mora Godoy
support-tonyKeymasterMarco,
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.
morilla7771ParticipantHi Tony:
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.
Best Regards,
Marco Antonio Mora Godoy
-
AuthorPosts