2020-07-19 22:16:23 +02:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
|
import { Routes, RouterModule } from '@angular/router';
|
2020-07-21 15:34:52 +02:00
|
|
|
import { AppComponent } from './app.component';
|
|
|
|
|
import { AuthGuard } from './account/auth.guard';
|
|
|
|
|
import { LoginComponent } from './account/login/login.component';
|
|
|
|
|
import { RegisterComponent } from './account/register/register.component';
|
2020-07-19 22:16:23 +02:00
|
|
|
|
|
|
|
|
|
2020-07-21 15:34:52 +02:00
|
|
|
const routes: Routes = [
|
|
|
|
|
{ path: '', component: AppComponent, canActivate: [AuthGuard] },
|
|
|
|
|
{ path: 'login', component: LoginComponent },
|
|
|
|
|
{ path: 'register', component: RegisterComponent },
|
|
|
|
|
{ path: '**', redirectTo: '' },
|
|
|
|
|
];
|
2020-07-19 22:16:23 +02:00
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
|
imports: [RouterModule.forRoot(routes)],
|
|
|
|
|
exports: [RouterModule]
|
|
|
|
|
})
|
|
|
|
|
export class AppRoutingModule { }
|