Tagged: Multiple projects
December 12, 2017 at 5:32 am #544927
We have here a project up and running under Angular5 – lets call it
We try now to make a new project – lets call it
new1Run. But since
app1Runhas many useful components we want to reuse them. E.g.
UserManagementComponentis used in
app1Runand should be used as well in
What is the best way to achieve the setups? Different projects? Or all in one project with just different launched apps?
If we use different projects the q raises how to refer to
new1Run-project? Is it with ‘../../../../app1Rund/src/dir…’? But here it complains about module not found. :-/
So, how to set multiple apps properly up with WebClipse?
thx rolandDecember 12, 2017 at 9:09 am #544931
You can create multiple app projects, then import modules using relative paths with the usual Angular conventions. You have to define the field
appsin the project’s .angular-cli.json. For example, create an Angular project with name “web-ng-cli” and two apps “app1” and “app2”. Next you have to add them to the “apps” section in the .angular-cli.json of “web-ng-cli”. Attached is the example angular-cli.json file for your reference. You can follow similar structure for your apps.
Currently, for the above setup, you can only launch the project i.e “web-ng-cli” from the Servers view and you have to explicitly run the apps from the Console view using the ‘ng serve’ command. Example:
ng serve --app [appName]
Hope this helps. Please let us know if you have any questions.
Attachments:You must be logged in to view attached files.December 13, 2017 at 1:50 am #544970
thx for your response. But unfortunately I’m not quite sure if I was understood properly – or maybe I didn’t make myself clear enough.
Your suggestion is about one Eclipse project which contains multiple Angular projects. I think for this your response is quite fine.
Perhaps I was little bit unclear but I wanted to have different Eclipse projects – which are handled as well differently in SVN/Git. My understanding from your response is that this is only possible with relative paths and Angular conventions.
I thought more in a way that I can specify in an Eclipse project (
new1Run) the related (or referenced) projects (e.g.
app1Run) and than some internal magic happens which allows me to address the modules directly within
new1Run…. I thought maybe Weclipse has a way to make the magic possible 😉December 14, 2017 at 7:10 am #545079
Unfortunately right now our TypeScript layer won’t be able to support a multi-project configuration, and so any further expected support with Angular wouldn’t work either.
Being able to support multi-project configurations is something we already had on our roadmap, so we’ll add your request to that list and let you know when the capability is added to our tooling.
Sorry we couldn’t help further, thank you for asking!