Closed iamhaaamed closed 6 years ago
@h4m3d66 can you explain a little more about what layout are you taking about for different modules?
I have separate module for each section of my web application, for example one module for user account, one module for shopping,... I want each module have its own layout. How I can do that?
@h4m3d66 If you are looking to achieve different layouts such as different navigations etc I would suggest looking into https://docs.google.com/presentation/d/1o1zbqxe-Fn4IdGRYeVGFNQb1PSiOpjXvIsNHRC7Bk1w/edit. this explains one way to achieve this. Since each module has different navigations, you could achieve something similar by providing different components based on the route you are on.
from @asadsahi link, we did something similar to
Each route that gets loaded into the router outlet is a different module for us. We actually are taking each module and putting it into its own scoped (private) npm package for our different areas of our business. (Accouting, Logistics, ...) These modules for us are in a since, their own applications.
I want some module have completely different layout(master page) not just its main content, for example in some module I dont want left nav and I want right nav or I dont want have left nav or right nav at all.
@h4m3d66 link I sent of slides have demo links at the bottom as well. Have you looked at it?
What you are trying to achieve sounds similar to what Alex from angular core team mentioned in his presentation, that you can build dynamic views for different routes.
closing as this is outside scope of this project.
How can I have different layout for different modules?