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

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 { }
