]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/app-routing.module.ts
WIP plugins: add theme support
[github/Chocobozzz/PeerTube.git] / client / src / app / app-routing.module.ts
index cff37a7d6f187930eb7622881cdac10ce493aa58..7ca51f226df24bf37c0055e85743ce3b5b5498de 100644 (file)
@@ -1,8 +1,9 @@
 import { NgModule } from '@angular/core'
-import { RouterModule, Routes } from '@angular/router'
+import { RouteReuseStrategy, RouterModule, Routes } from '@angular/router'
 
 import { PreloadSelectedModulesList } from './core'
 import { AppComponent } from '@app/app.component'
+import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy'
 
 const routes: Routes = [
   {
@@ -15,7 +16,7 @@ const routes: Routes = [
   },
   {
     path: 'verify-account',
-    loadChildren: './+verify-account/verify-account.module#VerifyAccountModule'
+    loadChildren: './+signup/+verify-account/verify-account.module#VerifyAccountModule'
   },
   {
     path: 'accounts',
@@ -29,6 +30,10 @@ const routes: Routes = [
     path: 'about',
     loadChildren: './+about/about.module#AboutModule'
   },
+  {
+    path: 'signup',
+    loadChildren: './+signup/+register/register.module#RegisterModule'
+  },
   {
     path: '',
     component: AppComponent // Avoid 404, app component will redirect dynamically
@@ -43,12 +48,14 @@ const routes: Routes = [
   imports: [
     RouterModule.forRoot(routes, {
       useHash: Boolean(history.pushState) === false,
+      scrollPositionRestoration: 'disabled',
       preloadingStrategy: PreloadSelectedModulesList,
-      anchorScrolling: 'enabled'
+      anchorScrolling: 'disabled'
     })
   ],
   providers: [
-    PreloadSelectedModulesList
+    PreloadSelectedModulesList,
+    { provide: RouteReuseStrategy, useClass: CustomReuseStrategy }
   ],
   exports: [ RouterModule ]
 })