Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature-request] enable lazy routing and parent module for multi tier applications in ng g app #402

Closed
lmeijdam opened this issue Apr 6, 2018 · 5 comments
Labels

Comments

@lmeijdam
Copy link

lmeijdam commented Apr 6, 2018

hey guys,

Just starting out using NX and it looks really slick!

I'm currently in a situation where our team is developing an application 'shell/layout' which can load up one or more applications (different teams/projects) depending on the route. At the current implementation, without NX, we use different applications and the 'shell' has a router configuration to lazy load the other application in a 'layout' like set up. The layout contains a header, a footer and a container. In which the container loads up the other applications.

I was wondering if you guys are planning on adding the router + lazy + parentmodule options to the 'ng g app' command. If not, what would you guys suggest instead?

@nweldev
Copy link
Contributor

nweldev commented Apr 8, 2018

I think what you describe is "lazy loaded lib", as shown in the documentation :
ng generate lib mymodule --routing --lazy --parentModule=apps/myapp/src/myapp.module.ts
See https://nrwl.io/nx/guide-nx-workspace#create-an-angular-module-lib

@lmeijdam
Copy link
Author

lmeijdam commented Apr 9, 2018

Thanks for your reply!

I thought of that too, and it will suffice for now! how would you set up your structure if there is another 'app' hosted on another server or environment which need to be loaded into your 'main' app? I added a small drawing to simplify (not the best drawing skills). The applications are also stand-alone applications seperately

example

Thanks anyway!

@nweldev
Copy link
Contributor

nweldev commented Apr 9, 2018

This is not the place to ask this kind of (non related to Nx) question. You should make one on stackoverflow (you can tag me if you want) and close this one.

@lmeijdam
Copy link
Author

lmeijdam commented Apr 9, 2018

Thanks, will do!

@lmeijdam lmeijdam closed this as completed Apr 9, 2018
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants