bitwarden-estensione-browser/src/app/app-routing.module.ts

38 lines
1.2 KiB
TypeScript
Raw Normal View History

2018-01-16 21:58:17 +01:00
import { NgModule } from '@angular/core';
import {
RouterModule,
Routes,
} from '@angular/router';
2018-04-04 14:30:14 +02:00
import { AuthGuardService } from 'jslib/angular/services/auth-guard.service';
2018-02-08 17:12:25 +01:00
2018-01-31 23:06:14 +01:00
import { HintComponent } from './accounts/hint.component';
2018-02-10 04:47:53 +01:00
import { LockComponent } from './accounts/lock.component';
2018-01-16 21:58:17 +01:00
import { LoginComponent } from './accounts/login.component';
2018-01-31 20:19:21 +01:00
import { RegisterComponent } from './accounts/register.component';
2018-02-01 04:54:13 +01:00
import { TwoFactorComponent } from './accounts/two-factor.component';
2018-01-16 22:12:26 +01:00
import { VaultComponent } from './vault/vault.component';
2018-01-16 21:58:17 +01:00
const routes: Routes = [
2018-02-08 17:12:25 +01:00
{ path: '', redirectTo: '/vault', pathMatch: 'full' },
2018-02-10 04:47:53 +01:00
{ path: 'lock', component: LockComponent },
2018-01-16 21:58:17 +01:00
{ path: 'login', component: LoginComponent },
2018-02-01 04:54:13 +01:00
{ path: '2fa', component: TwoFactorComponent },
2018-01-31 20:19:21 +01:00
{ path: 'register', component: RegisterComponent },
2018-02-08 17:12:25 +01:00
{
path: 'vault',
component: VaultComponent,
2018-02-08 18:24:17 +01:00
canActivate: [AuthGuardService],
2018-02-08 17:12:25 +01:00
},
2018-01-31 23:06:14 +01:00
{ path: 'hint', component: HintComponent },
2018-01-16 21:58:17 +01:00
];
@NgModule({
2018-01-16 23:30:57 +01:00
imports: [RouterModule.forRoot(routes, {
useHash: true,
/*enableTracing: true,*/
})],
2018-01-16 21:58:17 +01:00
exports: [RouterModule],
})
export class AppRoutingModule { }