//- -var variable={name:'name',pages:[{code:'Aa1',routeUri:''},{code:'Aa2',routeUri:'login'}]};

| import { CommonModule } from '@angular/common';
| import { NgModule } from '@angular/core';
| import { RouterModule } from '@angular/router';
| import { FormsModule, ReactiveFormsModule } from '@angular/forms';
| import { Component } from '@angular/core';
|
| @Component({
|   selector: 'app-root',
|   template: `
router-outlet
|
|   `
| })
| export class !{variable.name}Component {
|   title = 'app';
| }
|
| @NgModule({
|   declarations: [
|     !{variable.name}Component
|   ],
|   imports: [
|     CommonModule,
|     FormsModule,
|     ReactiveFormsModule,
|     RouterModule.forChild([
= '\n'
-var index=0;
each p in variable.pages
 if p.routeUri
  |       { path: '!{p.routeUri}', loadChildren: './!{p.code.toLowerCase()}/!{p.code.toLowerCase()}.module#!{p.code}Module' }
 else
  |       { path: '', loadChildren: './!{p.code.toLowerCase()}/!{p.code.toLowerCase()}.module#!{p.code}Module' }
 if (index+1)<variable.pages.length
  | ,
 = '\n'
 -index+=1;
|     ])
|   ],
|   providers: [],
|   bootstrap: [!{variable.name}Component]
| })
| export class !{variable.name}Module {
|   constructor() {}
| }
|