94 lines
2.7 KiB
TypeScript
94 lines
2.7 KiB
TypeScript
import { Routes } from '@angular/router';
|
|
import { AuthGuard } from './guards/auth.guard';
|
|
import { AccountComponent } from './pages/account/account.component';
|
|
import { BusinessListingsComponent } from './pages/business-listings/business-listings.component';
|
|
import { DetailsBusinessListingComponent } from './pages/details-business-listing/details-business-listing.component';
|
|
import { EditBusinessListingComponent } from './pages/edit-business-listing/edit-business-listing.component';
|
|
import { EmailAuthorizedComponent } from './pages/email-authorized/email-authorized.component';
|
|
import { EmailUsComponent } from './pages/email-us/email-us.component';
|
|
import { EmailVerificationComponent } from './pages/email-verification/email-verification.component';
|
|
import { FavoritesComponent } from './pages/favorites/favorites.component';
|
|
import { HomeComponent } from './pages/home/home.component';
|
|
import { LoginRegisterComponent } from './pages/login-register/login-register.component';
|
|
import { LogoutComponent } from './pages/logout/logout.component';
|
|
import { MyListingComponent } from './pages/my-listing/my-listing.component';
|
|
import { NotFoundComponent } from './pages/not-found/not-found.component';
|
|
import { UserListComponent } from './pages/user-list/user-list.component';
|
|
|
|
export const routes: Routes = [
|
|
{
|
|
path: 'businessListings',
|
|
component: BusinessListingsComponent,
|
|
},
|
|
{
|
|
path: 'home',
|
|
component: HomeComponent,
|
|
},
|
|
{
|
|
path: 'details-business-listing/:id',
|
|
component: DetailsBusinessListingComponent,
|
|
},
|
|
{
|
|
path: 'createBusinessListing',
|
|
component: EditBusinessListingComponent,
|
|
canActivate: [AuthGuard],
|
|
},
|
|
{
|
|
path: 'login/:page',
|
|
component: LoginRegisterComponent,
|
|
},
|
|
{
|
|
path: 'login',
|
|
component: LoginRegisterComponent,
|
|
},
|
|
{
|
|
path: 'notfound',
|
|
component: NotFoundComponent,
|
|
},
|
|
{
|
|
path: 'account',
|
|
component: AccountComponent,
|
|
canActivate: [AuthGuard],
|
|
},
|
|
{
|
|
path: 'editBusinessListing/:id',
|
|
component: EditBusinessListingComponent,
|
|
canActivate: [AuthGuard],
|
|
},
|
|
|
|
{
|
|
path: 'myListings',
|
|
component: MyListingComponent,
|
|
canActivate: [AuthGuard],
|
|
},
|
|
{
|
|
path: 'myFavorites',
|
|
component: FavoritesComponent,
|
|
canActivate: [AuthGuard],
|
|
},
|
|
{
|
|
path: 'emailUs',
|
|
component: EmailUsComponent,
|
|
// canActivate: [AuthGuard],
|
|
},
|
|
{
|
|
path: 'logout',
|
|
component: LogoutComponent,
|
|
canActivate: [AuthGuard],
|
|
},
|
|
{
|
|
path: 'emailVerification',
|
|
component: EmailVerificationComponent,
|
|
},
|
|
{
|
|
path: 'email-authorized',
|
|
component: EmailAuthorizedComponent,
|
|
},
|
|
{
|
|
path: 'admin/users',
|
|
component: UserListComponent,
|
|
canActivate: [AuthGuard],
|
|
},
|
|
{ path: '**', redirectTo: 'home' },
|
|
];
|