"Fossies" - the Fresh Open Source Software Archive

Member "angular-8.2.14/aio/content/examples/router/src/app/admin/admin-routing.module.1.ts" (13 Nov 2019, 1047 Bytes) of package /linux/www/angular-8.2.14.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 // #docplaster
    2 // #docregion
    3 import { NgModule }              from '@angular/core';
    4 import { RouterModule, Routes }  from '@angular/router';
    5 
    6 import { AdminComponent }           from './admin/admin.component';
    7 import { AdminDashboardComponent }  from './admin-dashboard/admin-dashboard.component';
    8 import { ManageCrisesComponent }    from './manage-crises/manage-crises.component';
    9 import { ManageHeroesComponent }    from './manage-heroes/manage-heroes.component';
   10 
   11 // #docregion admin-routes
   12 const adminRoutes: Routes = [
   13   {
   14     path: 'admin',
   15     component: AdminComponent,
   16     children: [
   17       {
   18         path: '',
   19         children: [
   20           { path: 'crises', component: ManageCrisesComponent },
   21           { path: 'heroes', component: ManageHeroesComponent },
   22           { path: '', component: AdminDashboardComponent }
   23         ]
   24       }
   25     ]
   26   }
   27 ];
   28 
   29 @NgModule({
   30   imports: [
   31     RouterModule.forChild(adminRoutes)
   32   ],
   33   exports: [
   34     RouterModule
   35   ]
   36 })
   37 export class AdminRoutingModule {}
   38 // #enddocregion admin-routes
   39 // #enddocregion