X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fapp-routing.module.ts;h=7ca51f226df24bf37c0055e85743ce3b5b5498de;hb=7cd4d2ba10106c10602c86f74f55743ded588896;hp=cff37a7d6f187930eb7622881cdac10ce493aa58;hpb=07a982363fcc6f838dd3f5c2039a2affaea3b0b2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index cff37a7d6..7ca51f226 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts @@ -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 ] })