import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {PageLoginComponent} from "./page-login/page-login.component";
import {PageRegisterComponent} from "./page-register/page-register.component";
import {PageInfoComponent} from "./page-info/page-info.component";
import {AuthGuard} from "./guard-auth/auth.guard";

const routes: Routes = [
  {path: "login", component: PageLoginComponent},
  {path: "register", component: PageRegisterComponent},
  {path: "info", component: PageInfoComponent, canActivate: [AuthGuard]}
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class UserRoutingModule {
}
