X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fapp-routing.module.ts;h=30e615b3ed0a9158762cc32db7b3fd2ebd42609b;hb=3d52b300ea79bec21f090e2447c4808307078618;hp=f31b51e2381e8226c59e69df90164e76067a9b4f;hpb=63c4db6d71b98523753c51747e308682d9a2e8a0;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index f31b51e23..30e615b3e 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts @@ -1,17 +1,37 @@ import { NgModule } from '@angular/core' -import { Routes, RouterModule } from '@angular/router' +import { RouterModule, Routes } from '@angular/router' import { PreloadSelectedModulesList } from './core' +import { AppComponent } from '@app/app.component' const routes: Routes = [ + { + path: 'admin', + loadChildren: './+admin/admin.module#AdminModule' + }, + { + path: 'my-account', + loadChildren: './+my-account/my-account.module#MyAccountModule' + }, + { + path: 'accounts', + loadChildren: './+accounts/accounts.module#AccountsModule' + }, + { + path: 'video-channels', + loadChildren: './+video-channels/video-channels.module#VideoChannelsModule' + }, + { + path: 'about', + loadChildren: './+about/about.module#AboutModule' + }, { path: '', - redirectTo: '/videos/trending', - pathMatch: 'full' + component: AppComponent // Avoid 404, app component will redirect dynamically }, { - path: 'admin', - loadChildren: './+admin/admin.module#AdminModule' + path: '**', + loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule' } ] @@ -22,7 +42,9 @@ const routes: Routes = [ preloadingStrategy: PreloadSelectedModulesList }) ], - providers: [ PreloadSelectedModulesList ], + providers: [ + PreloadSelectedModulesList + ], exports: [ RouterModule ] }) export class AppRoutingModule {}