diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 2f35db5..6635d3c 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -23,19 +23,20 @@ import { UiMain } from './ui/main/main.ui'; const routes: Routes = [ { path: '', component: UiMain, children: [ - { path: '', component: PageTop, canActivate: [ AuthenticatedGuard ] }, - { path: 'c/:id', component: PageComment, canActivate: [ AuthenticatedGuard ] }, - { path: 'e/:id', component: PageEntry, canActivate: [ AuthenticatedGuard ] }, - { path: 'u/:username', component: PageUser, canActivate: [ AuthenticatedGuard ] }, - { path: 'u/c/:username', component: PageUserComments, canActivate: [ AuthenticatedGuard ] }, - { path: 'u/e/:username', component: PageUserEntries, canActivate: [ AuthenticatedGuard ] }, + { path: '', redirectTo: "/top", pathMatch: 'full' }, + { path: 'login', component: PageLogin, canActivate: [ AnonymousGuard ] }, + { path: 'top', component: PageTop, canActivate: [ AuthenticatedGuard ] }, { path: 'hot', component: PageHot, canActivate: [ AuthenticatedGuard ] }, { path: 'last', component: PageLast, canActivate: [ AuthenticatedGuard ] }, { path: 'new', component: PageNew, canActivate: [ AuthenticatedGuard ] }, { path: 'bookmarks', component: PageBookmarks, canActivate: [ AuthenticatedGuard ] }, - { path: 'submit', component: PageSubmission, canActivate: [ AuthenticatedGuard ] }, - { path: 'login', component: PageLogin, canActivate: [ AnonymousGuard ] }, { path: 'settings', component: PageSettings, canActivate: [ AuthenticatedGuard ] }, + { path: 'submit', component: PageSubmission, canActivate: [ AuthenticatedGuard ] }, + { path: 'e/:id', component: PageEntry, canActivate: [ AuthenticatedGuard ] }, + { path: 'c/:id', component: PageComment, canActivate: [ AuthenticatedGuard ] }, + { path: 'u/:username', component: PageUser, canActivate: [ AuthenticatedGuard ] }, + { path: 'u/c/:username', component: PageUserComments, canActivate: [ AuthenticatedGuard ] }, + { path: 'u/e/:username', component: PageUserEntries, canActivate: [ AuthenticatedGuard ] }, { path: 'unavailable', component: PageUnavailable }, { path: '**', component: PageNotFound, pathMatch: 'full', canActivate: [ AuthUpdateGuard ] }, ] diff --git a/src/app/ui/main/main.ui.html b/src/app/ui/main/main.ui.html index 7ef1c27..28e3034 100644 --- a/src/app/ui/main/main.ui.html +++ b/src/app/ui/main/main.ui.html @@ -22,7 +22,7 @@ login {{'login' | i18n}} - + trending_up {{'page.top' | i18n}}