facebook

¿How to configuring IDE for Angular 2 by default?

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #583618 Reply

    morilla7771
    Participant

    Hi:

    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

    #583740 Reply

    support-tony
    Keymaster

    Marco,

    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 execute npm 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.

    #586254 Reply

    morilla7771
    Participant

    Hi 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

    #586522 Reply

    support-tony
    Keymaster

    Marco,

    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 a src 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.

    #586617 Reply

    morilla7771
    Participant

    Hi 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

    #586683 Reply

    support-tony
    Keymaster

    Marco,

    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.

    #586755 Reply

    morilla7771
    Participant

    Hi 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

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: ¿How to configuring IDE for Angular 2 by default?

You must be logged in to post in the forum log in