import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { Routes, RouterModule } from '@angular/router'; import { LayoutModule } from '../../../../layouts/layout.module'; import { DefaultComponent } from '../../default.component'; import { ConfigurationComponent } from './configuration.component'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; // var routes: Routes = [ // { // path: '', // component: ConfigurationComponent, // children: [] // } // ]; // if (window.location.href.indexOf('iframe') == -1) { // routes[0].path = ''; // routes[0].component = DefaultComponent; // routes[0].children = [ // { // path: '', // component: ConfigurationComponent // } // ]; // } var routes: Routes = [ { path: '', component: DefaultComponent, children: [ { path: '', component: ConfigurationComponent } ] } ]; @NgModule({ imports: [ CommonModule, RouterModule.forChild(routes), LayoutModule, FormsModule ], exports: [RouterModule], declarations: [ConfigurationComponent] }) export class ConfigurationModule {}