Tagged: Multiple projects
- This topic has 3 replies, 3 voices, and was last updated 6 years, 11 months ago by Brian Fernandes.
-
AuthorPosts
-
rolandhParticipantWe have here a project up and running under Angular5 – lets call it
app1Run
.We try now to make a new project – lets call it
new1Run
. But sinceapp1Run
has many useful components we want to reuse them. E.g.UserManagementComponent
is used inapp1Run
and should be used as well innew1Run
.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
UserManagementComponent
fromapp1Run
in theapp.module
ofnew1Run
-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 roland
support-swapnaModeratorrolandh,
You can create multiple app projects, then import modules using relative paths with the usual Angular conventions. You have to define the field
name
withinapps
in 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.
–Swapna
MyEclipse SupportAttachments:
You must be logged in to view attached files.
rolandhParticipantHi Swapna,
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 withinnew1Run
…. I thought maybe Weclipse has a way to make the magic possible 😉
Brian FernandesModeratorRoland,
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!
-
AuthorPosts