Refactor routes order.
This commit is contained in:
@@ -15,18 +15,17 @@ import { CreateUpdatePostComponent } from './posts/create-update/create-update-p
|
||||
import { VersionRevisionComponent } from './version-revisions/version-revisions.component';
|
||||
|
||||
export const appRoutes: Routes = [
|
||||
{ path: '', redirectTo: '/home', pathMatch: 'full' },
|
||||
{ path: 'home', component: HomeComponent },
|
||||
{ path: 'login', component: LoginComponent },
|
||||
{ path: 'home', component: HomeComponent },
|
||||
{ path: 'disconnection', component: DisconnectionComponent },
|
||||
{ path: 'posts/new', component: CreateUpdatePostComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'posts/update/:postKey', component: CreateUpdatePostComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'posts/:postKey', component: PostComponent },
|
||||
{ path: 'posts/byCategory/:categoryId', component: ByCategoryComponent},
|
||||
{ path: 'myPosts', component: MyPostsComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'accountSettings', component: AccountSettingsComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'changePassword', component: ChangePasswordComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'profilEdit', component: ProfilEditionComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'posts/new', component: CreateUpdatePostComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'posts/:postKey', component: PostComponent },
|
||||
{ path: 'posts/byCategory/:categoryId', component: ByCategoryComponent},
|
||||
{ path: 'posts/update/:postKey', component: CreateUpdatePostComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'versionrevisions', component: VersionRevisionComponent },
|
||||
{ path: '', redirectTo: '/home', pathMatch: 'full' },
|
||||
{ path: '**', redirectTo: '/home' }
|
||||
|
||||
Reference in New Issue
Block a user