diff options
author | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-07 18:29:12 +0100 |
---|---|---|
committer | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-07 18:29:12 +0100 |
commit | c59ff03b96d7b638623c254dfe8477055aeb2a35 (patch) | |
tree | 933ffdbf0e0d4300424d73c11bbcc8156851a71c /frontend/src/app/app-routing.module.ts | |
parent | 9b925712cbdedacdf8af947e929ca3975b56e3fa (diff) | |
parent | cd2188997ff4cbcce83e3cada3fc220375ebc78e (diff) |
Merge branch 'frontendLoginRegister' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into frontend
# Conflicts:
# frontend/package-lock.json
# frontend/package.json
Diffstat (limited to 'frontend/src/app/app-routing.module.ts')
-rw-r--r-- | frontend/src/app/app-routing.module.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts index 02972627..1868e56c 100644 --- a/frontend/src/app/app-routing.module.ts +++ b/frontend/src/app/app-routing.module.ts @@ -1,7 +1,16 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -const routes: Routes = []; +import { LoginPageComponent } from './_pages/login-page/login-page.component'; +import { OnlyAuthorizedComponent } from './_pages/only-authorized/only-authorized.component'; +import { RegisterPageComponent } from './_pages/register-page/register-page.component'; +import { AuthGuardService } from './_services/auth-guard.service'; + +const routes: Routes = [ + { path: 'login', component: LoginPageComponent }, + { path: 'register', component: RegisterPageComponent }, + { path: 'only-authorized', component: OnlyAuthorizedComponent, canActivate: [AuthGuardService] } +]; @NgModule({ imports: [RouterModule.forRoot(routes)], |