import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { Routes, RouterModule } from '@angular/router'; import { AllProposalsComponent } from './all-proposals.component'; import { LayoutModule } from '../../../../layouts/layout.module'; import { DefaultComponent } from '../../default.component'; import { NgxPaginationModule } from 'ngx-pagination'; import { SharedModule } from '../../shared.module'; // import { ShortenPipe } from '../categorize-proposal/shorten.pipe'; // var routes: Routes = [ // { // path: '', // component: AllProposalsComponent, // children: [] // } // ]; // if (window.location.href.indexOf('iframe') == -1) { // routes[0].path = ''; // routes[0].component = DefaultComponent; // routes[0].children = [ // { // path: '', // component: AllProposalsComponent // } // ]; // } const routes: Routes = [ { path: '', component: DefaultComponent, children: [ { path: '', component: AllProposalsComponent } ] } ]; @NgModule({ imports: [ CommonModule, RouterModule.forChild(routes), LayoutModule, NgxPaginationModule, SharedModule ], exports: [RouterModule], declarations: [ AllProposalsComponent // ShortenPipe ] }) export class AllProposalsModule {}