After spending the whole day on Google, my question remains unanswered.
As I am new to creating Angular app using version 6.0.4. my first and simple question is:
Is it possible to configure Angular app with multilevel landing pages?
Example: Without exposing the links on top nav bar of the root page, I need direct links to these pages where the users have their own different menus. like: WordPress/admin panel is different than its website.
/home
for public view /admin
for admin section after login/customer
for customer section after loginthis is because I found that there is only one app.component.html
file where we can include our components using Routing but with static navigation bar on the top.
If not:
How to run multiple apps created for all above 3 section can be run under the same url:port
?
SOLVED
By following this: https://angular.io/guide/lazy-loading-ngmodules
NOTE: at the end must comment out the navigation buttons in the app.component.html
<!--
<h1>
{{title}}
</h1>
<button routerLink="/customers">Customers</button>
<button routerLink="/orders">Orders</button>
<button routerLink="">Home</button>
-->
<router-outlet></router-outlet>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With