RoutingModuleExpander

Expands:

$applicationRoot.directory$/native/ionic/src/app/app-routing.module.ts

if:

true
property value
element type ApplicationInstance
qualified name net.democritus.expander.ionic.applicationinstance.base.RoutingModuleExpander
layer ROOT
technology COMMON
sourceType JS
phase expansion
features  

Example

Some example of the content generated by the expander:

import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';

import { MenuComponent } from './components/menu/menu.component';
import { AuthGuard } from './guards/authentication.guard';

const appRoutes: Routes = [
  { path: '', redirectTo: '/home', pathMatch: 'full' },
  { path: 'home', loadChildren: './pages/home/home.module#HomePageModule' },
  // anchor:custom-guard-routes:start
  // anchor:custom-guard-routes:end
];

const navigation: Routes = [
  {
    path: '',
    component: MenuComponent,
    children: appRoutes,
    canActivate: [AuthGuard],
  },
  {
    path: 'login',
    loadChildren: './pages/login/login.module#LoginPageModule'
  },
];

// anchor:custom-routes:start
// anchor:custom-routes:end

@NgModule({
  imports: [
    RouterModule.forRoot(navigation, { preloadingStrategy: PreloadAllModules })
  ],
  exports: [RouterModule]
})
export class AppRoutingModule { }