import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {FrameComponent} from './frame.component';
import {SharedModule} from '../../shared/shared.module';

const routes: Routes = [
    { path: '',  component: FrameComponent, children: [
        { path: 'res', loadChildren: './res/res.frame.module#FrameResModule' },
        { path: 'param', loadChildren: './param/param.frame.module#FrameParamModule' },
        { path: 'dict', loadChildren: './dict/dict.frame.module#FrameDictModule' },
        { path: 'dept', loadChildren: './dept/dept.frame.module#FrameDeptModule' },
        { path: 'role', loadChildren: './role/role.frame.module#FrameRoleModule' },
        { path: 'optr', loadChildren: './optr/optr.frame.module#FrameOptrModule' },
        { path: 'thread', loadChildren: './thread/thread.frame.module#FrameThreadModule' }
      ]
    }
];

@NgModule({
    imports: [
        SharedModule,
        RouterModule.forChild(routes)
    ],
    declarations: [FrameComponent],
    exports: [
        RouterModule
    ]
})
export class FrameModule { }
