Commit 617ab770 by Tuukka Kivilahti

viplist is now lazyloaded thingy

1 parent 3012b2dc
Pipeline #59 failed
in 0 seconds
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule, PreloadAllModules } from '@angular/router'; import {Routes, RouterModule, PreloadAllModules, NoPreloading} from '@angular/router';
import { LoginComponent } from './modules/login/login.component'; import { LoginComponent } from './modules/login/login.component';
import {FrontpageComponent} from './components/frontpage/frontpage.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 = [ const APP_ROUTES: Routes = [
{ path: 'login', component: LoginComponent }, { path: 'login', component: LoginComponent },
/*{ path: 'viplist', loadChildren: 'app/modules/viplist/viplist.module#ViplistModule' },*/ { path: 'viplist', loadChildren: 'app/modules/viplist/viplist.module#ViplistModule' },
{ path: 'viplist', component: InfoViplistPageComponent }, /*{ path: 'viplist', component: InfoViplistPageComponent },*/
{ path: 'old', loadChildren: 'app/modules/old-moya/old-moya.module#OldMoyaModule' }, { path: 'old', loadChildren: 'app/modules/old-moya/old-moya.module#OldMoyaModule' },
{ path: 'index', component: FrontpageComponent }, { path: 'index', component: FrontpageComponent },
{ path: '', pathMatch: 'full' , redirectTo: '/index', } { path: '', pathMatch: 'full' , redirectTo: '/index', }
......
...@@ -13,7 +13,6 @@ import { MoyaLocaleComponent } from './components/moya-locale/moya-locale.compon ...@@ -13,7 +13,6 @@ import { MoyaLocaleComponent } from './components/moya-locale/moya-locale.compon
import { TopMenuComponent } from './menu/top-menu/top-menu.component'; import { TopMenuComponent } from './menu/top-menu/top-menu.component';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import {ViplistModule} from './modules/viplist/viplist.module';
import {LoginModule} from './modules/login/login.module'; import {LoginModule} from './modules/login/login.module';
import {LeftMenuModule} from './menu/left-menu/left-menu.module'; import {LeftMenuModule} from './menu/left-menu/left-menu.module';
import { FrontpageComponent } from './components/frontpage/frontpage.component'; import { FrontpageComponent } from './components/frontpage/frontpage.component';
...@@ -30,16 +29,10 @@ import { FrontpageComponent } from './components/frontpage/frontpage.component'; ...@@ -30,16 +29,10 @@ import { FrontpageComponent } from './components/frontpage/frontpage.component';
AppRoutingModule, AppRoutingModule,
FormsModule, FormsModule,
HttpClientModule, HttpClientModule,
ViplistModule,
LoginModule, LoginModule,
LeftMenuModule, LeftMenuModule,
// remove
ViplistModule,
// /remove
AlertModule.forRoot(), AlertModule.forRoot(),
TranslateModule.forRoot({ TranslateModule.forRoot({
loader: { loader: {
......
...@@ -21,7 +21,7 @@ export class MENU { ...@@ -21,7 +21,7 @@ export class MENU {
'name': 'Users', 'name': 'Users',
'items': [ 'items': [
{ 'path': '/old/info', 'name': 'List users', 'params': {p: 'useradmin/list.jsf'} }, { 'path': '/old/info', 'name': 'List users', 'params': {p: 'useradmin/list.jsf'} },
{ 'path': '/viplist', 'name': 'VipList'} { 'path': '/viplist/info', 'name': 'VipList'}
]} ]}
]; ];
......
...@@ -4,7 +4,7 @@ import { Routes, RouterModule } from '@angular/router'; ...@@ -4,7 +4,7 @@ import { Routes, RouterModule } from '@angular/router';
import {InfoViplistPageComponent} from './info/info-viplist-page.component'; import {InfoViplistPageComponent} from './info/info-viplist-page.component';
const routes: Routes = [ const routes: Routes = [
{ path: '', component: InfoViplistPageComponent } { path: 'info', component: InfoViplistPageComponent }
]; ];
@NgModule({ @NgModule({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!