I am new to Angular and I'm just done reading the book "ng-book : The complete book on Angular 6".
I am currently having a simple question which I couldn't find a proper answer.
I would like to build an application like so :
MainLayout : Base layout for all main website pages. Beautiful header, footer, etc. AdminLayout : Base layout all admin pages. Another header with a left sidebar.
http://my-app.com : Application with multiple routes. All routes shares the same base layout (MainLayout)
http:///my-app.com/admin : Same application, same backend, however it uses a different layout than the main website (AdminLayout), but all child routes of /admin shares the same layout (AdminLayout).
What I though I could do :
- app
- admin
- admin.module.ts (define admin routes)
- admin.component.ts (and html has a router-outlet)
- main
- main.module.ts (defines main routes)
- main.component.ts (and html has a router-outlet)
- app.module.ts (with router/empty route)
- app-routing.component.ts (with router-outlet)
- admin
Is it the right way of doing it ?
Thank you