connect-admin/app/app.routing.ts

96 lines
2.8 KiB
TypeScript
Raw Normal View History

/**
* Created by stefania on 9/16/16.
*/
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { DashboardComponent } from "./dashboard.component";
import { CommunitiesComponent } from './pages/community/communities.component';
import { CommunityEditFormComponent } from "./pages/community/community-edit-form.component";
import { EntitiesComponent } from "./pages/entity/entities.component";
import { PagesComponent } from "./pages/page/pages.component";
import { PageHelpContentsComponent } from "./pages/helpcontent/page-help-contents.component";
import { NewPageHelpContentComponent } from "./pages/helpcontent/new-page-help-content.component";
import { EditPageHelpContentComponent } from "./pages/helpcontent/edit-page-help-content.component";
import { DivIdsComponent } from "./pages/divId/divIds.component";
import { DivHelpContentsComponent } from "./pages/divhelpcontent/div-help-contents.component";
import { NewDivHelpContentComponent } from "./pages/divhelpcontent/new-div-help-content.component";
import { EditDivHelpContentComponent } from "./pages/divhelpcontent/edit-div-help-content.component";
import {FreeGuard, AdminLoginGuard} from 'ng-openaire-library';
const appRoutes: Routes = [
{
path: '',
redirectTo: 'dashboard',
pathMatch: 'full'
},
{
path: 'dashboard',
component: DashboardComponent,
canActivate: [FreeGuard]
},
{
path: 'communities',
component: CommunitiesComponent,
canActivate: [FreeGuard]
},
{
path: 'community-edit-form',
component: CommunityEditFormComponent,
canActivate: [FreeGuard]
},
{
path: 'entities',
component: EntitiesComponent,
canActivate: [FreeGuard]
},
{
path: 'classes',
component: DivIdsComponent,
},
{
path: 'pages',
component: PagesComponent,
canActivate: [FreeGuard]
},
{
path: 'pageContents',
component: PageHelpContentsComponent,
canActivate: [FreeGuard]
},
{
path: 'pageContents/new',
component: NewPageHelpContentComponent,
canActivate: [FreeGuard]
},
{
//path: 'pageContents/edit/:id',
path: 'pageContents/edit',
component: EditPageHelpContentComponent,
canActivate: [FreeGuard]
},
{
path: 'classContents',
component: DivHelpContentsComponent,
},
{
path: 'classContents/new',
component: NewDivHelpContentComponent,
},
{
path: 'classContents/edit',
component: EditDivHelpContentComponent,
},
{ path: '**',pathMatch: 'full',component: DashboardComponent }
];
export const appRoutingProviders: any[] = [
];
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);