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

const routes: Routes = [
    { path: '',  component: WeixinComponent, children: [
        { path: 'define', loadChildren: './define/define.weixin.module#WeixinDefineModule' },
        { path: 'menu', loadChildren: './menu/menu.weixin.module#WeixinMenuModule' },
        { path: 'param', loadChildren: './param/param.weixin.module#WeixinParamModule' },
        { path: 'processor', loadChildren: './processor/processor.weixin.module#WeixinProcessorModule' },
        { path: 'reply', loadChildren: './reply/reply.weixin.module#WeixinReplyModule' },
        { path: 'tag', loadChildren: './tag/tag.weixin.module#WeixinTagModule' },
        { path: 'template', loadChildren: './template/template.weixin.module#WeixinTemplateModule' },
        { path: 'user', loadChildren: './user/user.weixin.module#WeixinUserModule' }
      ]
    }
];

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