20

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:

  1. 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 login

this 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.

  1. If not:

    How to run multiple apps created for all above 3 section can be run under the same url:port?

4

1 回答 1

8

解决了

按照这个:https ://angular.io/guide/lazy-loading-ngmodules

注意:最后必须注释掉导航按钮中的app.component.html

<!--
<h1>
  {{title}}
</h1>

<button routerLink="/customers">Customers</button>
<button routerLink="/orders">Orders</button>
<button routerLink="">Home</button>
-->

<router-outlet></router-outlet>
于 2018-06-11T18:40:30.467 回答