app-routing.module.ts 1.03 KB
import { NgModule } from '@angular/core';
import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
import { LoginComponent } from './modules/login/login.component';
import {FrontpageComponent} from "./components/frontpage/frontpage.component";
import {ViplistModule} from "./modules/viplist/viplist.module";
import {InfoViplistPageComponent} from "./modules/viplist/info/info-viplist-page.component";

const APP_ROUTES: Routes = [
  { path: 'login', component: LoginComponent },
  /*{ path: 'viplist', loadChildren: 'app/modules/viplist/viplist.module#ViplistModule'  },*/
  { path: 'viplist', component: InfoViplistPageComponent  },
  { path: 'old', loadChildren: 'app/modules/old-moya/old-moya.module#OldMoyaModule'  },
  { path: 'index',   component: FrontpageComponent },
  { path: '',   pathMatch: 'full' , redirectTo: '/index', }
];

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