Commit 872f0c3e by Chao Sun

style: rename page

parent eddac7e7
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common'
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router'
import {AskComponent} from './ask/ask.component'; import { AskComponent } from './ask/ask.component'
import {AskdetailComponent} from './askdetail/askdetail.component';
import {PageTwoComponent} from './page-two/page-two.component';
import {PageThreeComponent} from './page-three/page-three.component';
import {PageFourComponent} from './page-four/page-four.component';
import {PageFiveComponent} from './page-five/page-five.component';
import {PageSixComponent} from './page-six/page-six.component';
import {PageSevenComponent} from './page-seven/page-seven.component';
import {PageEightComponent} from './page-eight/page-eight.component';
import {PageNineComponent} from './page-nine/page-nine.component';
import {PageTenComponent} from './page-ten/page-ten.component';
import {Page11Component} from './page11/page11.component';
import {Page12Component} from './page12/page12.component';
import {Page13Component} from './page13/page13.component';
import {Page14Component} from './page14/page14.component';
import {Page15Component} from './page15/page15.component';
import {Page16Component} from './page16/page16.component';
import {Page17Component} from './page17/page17.component';
const routes: Routes = [ const routes: Routes = [
{ {
path: '', redirectTo: '/index', pathMatch: 'full' path: '',
redirectTo: '/index',
pathMatch: 'full'
}, },
{path:'index', component: AskComponent, {
data: { path: 'index',
limbo: '1', component: AskComponent
} }
}, ]
{path:'question1',component: AskdetailComponent },
{path:'question2',component:PageTwoComponent},
{path:'question3',component:PageThreeComponent},
{path:'question4',component:PageFourComponent},
{path:'question5',component:PageFiveComponent},
{path:'question6',component:PageSixComponent},
{path:'question7',component:PageSevenComponent},
{path:'question8',component:PageEightComponent},
{path:'question9',component:PageNineComponent},
{path:'question10',component:PageTenComponent},
{path:'question11',component:Page11Component},
{path:'question12',component:Page12Component},
{path:'question13',component:Page13Component},
{path:'question14',component:Page14Component},
{path:'question15',component:Page15Component},
{path:'question16',component:Page16Component},
{path:'question17',component:Page17Component},
{path:'index', component: AskComponent,
data: {
limbo: '2',
}
},
];
@NgModule({ @NgModule({
declarations: [], declarations: [],
imports: [ imports: [CommonModule, RouterModule.forRoot(routes)],
CommonModule, exports: [RouterModule]
RouterModule.forRoot(routes)
],
exports:[
RouterModule
]
}) })
export class AppRoutingModule { } export class AppRoutingModule {}
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser'
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core'
import { ModalModule } from 'ngx-bootstrap/modal'; import { AppComponent } from './app.component'
import { AppComponent } from './app.component'; import { AskComponent } from './ask/ask.component'
import { AskComponent } from './ask/ask.component'; import { AppRoutingModule } from './app-routing.module'
import { AppRoutingModule } from './app-routing.module'; import { HttpClientModule } from '@angular/common/http'
import { AskdetailComponent } from './askdetail/askdetail.component'; import { CommonService } from './common.service'
import { PageTwoComponent } from './page-two/page-two.component'; import { LocalStorage } from './local.storage'
import { PageThreeComponent } from './page-three/page-three.component'; import { Page1Component } from './page1/page1.component'
import {HttpClientModule} from '@angular/common/http'; import { Page2Component } from './page2/page2.component'
import {CommonService} from './common.service'; import { Page3Component } from './page3/page3.component'
import { PageFourComponent } from './page-four/page-four.component'; import { Page4Component } from './page4/page4.component'
import {LocalStorage} from './local.storage'; import { Page5Component } from './page5/page5.component'
import { PageFiveComponent } from './page-five/page-five.component'; import { Page6Component } from './page6/page6.component'
import { PageSixComponent } from './page-six/page-six.component'; import { Page7Component } from './page7/page7.component'
import { PageSevenComponent } from './page-seven/page-seven.component'; import { Page8Component } from './page8/page8.component'
import { PageEightComponent } from './page-eight/page-eight.component'; import { Page9Component } from './page9/page9.component'
import { PageNineComponent } from './page-nine/page-nine.component'; import { Page10Component } from './page10/page10.component'
import { PageTenComponent } from './page-ten/page-ten.component'; import { Page11Component } from './page11/page11.component'
import { Page11Component } from './page11/page11.component'; import { Page12Component } from './page12/page12.component'
import { Page12Component } from './page12/page12.component'; import { Page13Component } from './page13/page13.component'
import { Page13Component } from './page13/page13.component'; import { Page14Component } from './page14/page14.component'
import { Page14Component } from './page14/page14.component'; import { Page15Component } from './page15/page15.component'
import { Page15Component } from './page15/page15.component'; import { Page16Component } from './page16/page16.component'
import { Page16Component } from './page16/page16.component';
import { Page17Component } from './page17/page17.component'; import { Page17Component } from './page17/page17.component'
import { Limbo1Component } from './limbo1/limbo1.component';
import { Limbo2Component } from './limbo2/limbo2.component';
import { Limbo3Component } from './limbo3/limbo3.component';
import { Limbo4Component } from './limbo4/limbo4.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
AskComponent, AskComponent,
AskdetailComponent, Page1Component,
PageTwoComponent, Page2Component,
PageThreeComponent, Page3Component,
PageFourComponent, Page4Component,
PageFiveComponent, Page5Component,
PageSixComponent, Page6Component,
PageSevenComponent, Page7Component,
PageEightComponent, Page8Component,
PageNineComponent, Page9Component,
PageTenComponent, Page10Component,
Page11Component, Page11Component,
Page12Component, Page12Component,
Page13Component, Page13Component,
Page14Component, Page14Component,
Page15Component, Page15Component,
Page16Component, Page16Component,
Page17Component, Page17Component
Limbo1Component,
Limbo2Component,
Limbo3Component,
Limbo4Component
], ],
imports: [ imports: [BrowserModule, AppRoutingModule, HttpClientModule],
BrowserModule, providers: [CommonService, LocalStorage],
AppRoutingModule,
HttpClientModule,ModalModule.forRoot()
],
providers: [CommonService,LocalStorage],
bootstrap: [AppComponent] bootstrap: [AppComponent]
}) })
export class AppModule { } export class AppModule {}
<div class="container"> <div class="container">
<div class="wrapper layout"> <div class="wrapper layout">
<!-- {{curPage}} --> <!-- {{curPage}} -->
<app-limbo1 [curPageData]="curPageData" *ngIf="curPage == 0"></app-limbo1> <app-page1 [curPageData]="curPageData" *ngIf="curPage == 0"></app-page1>
<app-askdetail [curPageData]="curPageData" *ngIf="curPage == 1"></app-askdetail> <app-page2 [curPageData]="curPageData" *ngIf="curPage == 1"></app-page2>
<app-page-two [curPageData]="curPageData" *ngIf="curPage == 2"></app-page-two> <app-page3 [curPageData]="curPageData" *ngIf="curPage == 2"></app-page3>
<app-page-three [curPageData]="curPageData" *ngIf="curPage == 3"></app-page-three> <app-page4 [curPageData]="curPageData" *ngIf="curPage == 3"></app-page4>
<app-page-four [curPageData]="curPageData" *ngIf="curPage == 4"></app-page-four> <app-page5 [curPageData]="curPageData" *ngIf="curPage == 4"></app-page5>
<app-limbo2 [curPageData]="curPageData" *ngIf="curPage == 5"> </app-limbo2> <app-page6 [curPageData]="curPageData" *ngIf="curPage == 5"> </app-page6>
<app-page-five [curPageData]="curPageData" *ngIf="curPage == 6"></app-page-five> <app-page7 [curPageData]="curPageData" *ngIf="curPage == 6"></app-page7>
<app-page-six [curPageData]="curPageData" *ngIf="curPage == 7"></app-page-six> <app-page8 [curPageData]="curPageData" *ngIf="curPage == 7"></app-page8>
<app-page-seven [curPageData]="curPageData" *ngIf="curPage == 8"></app-page-seven> <app-page9 [curPageData]="curPageData" *ngIf="curPage == 8"></app-page9>
<app-limbo3 [curPageData]="curPageData" *ngIf="curPage == 9"></app-limbo3> <app-page10 [curPageData]="curPageData" *ngIf="curPage == 9"></app-page10>
<app-page-eight [curPageData]="curPageData" *ngIf="curPage == 10"></app-page-eight> <app-page11 [curPageData]="curPageData" *ngIf="curPage == 10"></app-page11>
<app-page-nine [curPageData]="curPageData" *ngIf="curPage == 11"></app-page-nine> <app-page12 [curPageData]="curPageData" *ngIf="curPage == 11"></app-page12>
<app-page-ten [curPageData]="curPageData" *ngIf="curPage == 12"></app-page-ten> <app-page13 [curPageData]="curPageData" *ngIf="curPage == 12"></app-page13>
<app-page11 [curPageData]="curPageData" *ngIf="curPage == 13"></app-page11> <app-page14 [curPageData]="curPageData" *ngIf="curPage == 13"></app-page14>
<app-page12 [curPageData]="curPageData" *ngIf="curPage == 14"></app-page12> <app-page15 [curPageData]="curPageData" *ngIf="curPage == 14"></app-page15>
<app-page13 [curPageData]="curPageData" *ngIf="curPage == 15"></app-page13> <app-page16 [curPageData]="curPageData" *ngIf="curPage == 15"></app-page16>
<app-limbo4 [curPageData]="curPageData" *ngIf="curPage == 16"></app-limbo4> <app-page17 [curPageData]="curPageData" *ngIf="curPage == 16"></app-page17>
<!-- <app-page14 [curPageData]="curPageData" *ngIf="curPage == 16"></app-page14> <div class="footer" *ngIf="curPage == 0" (click)="addPage()">
<app-page15 [curPageData]="curPageData" *ngIf="curPage == 17"></app-page15> -->
<!-- <div class="footer" routerLink="/question1">
<div>获取家庭分析报告</div> <div>获取家庭分析报告</div>
</div> --> </div>
<div class="content_footer"> <div class="content_footer" *ngIf="curPage != 0">
<div (click)=reducePage()>&lt;</div> <div (click)="reducePage()">&lt;</div>
<div (click)="addPage()" class="next">下一步</div> <div (click)="addPage()" class="next">下一步</div>
</div> </div>
</div> </div>
</div> </div>
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core'
import {CommonService} from '../common.service'; import { CommonService } from '../common.service'
@Component({ @Component({
selector: 'app-ask', selector: 'app-ask',
...@@ -7,53 +7,47 @@ import {CommonService} from '../common.service'; ...@@ -7,53 +7,47 @@ import {CommonService} from '../common.service';
styleUrls: ['./ask.component.css'] styleUrls: ['./ask.component.css']
}) })
export class AskComponent implements OnInit { export class AskComponent implements OnInit {
allQues:Array<any>; allQues: Array<any>
curPage: number; curPage: number
totalPage: number; totalPage: number
curQues: string; curQues: string
curPageData: Object; curPageData: Object
allAnswers: Array<any>; allAnswers: Array<any>
constructor( constructor(private commonService: CommonService) {}
private commonService:CommonService
) {
}
ngOnInit() { ngOnInit() {
this.surveyInfo() this.surveyInfo()
this.curPage = 0 this.curPage = 0
this.totalPage = 17 this.totalPage = 17
this.curPageData = [] this.curPageData = []
setTimeout(()=>{ setTimeout(() => {
this.curPageData = this.allQues[this.curPage] this.curPageData = this.allQues[this.curPage]
},500) }, 500)
} }
surveyInfo(){ surveyInfo() {
this.commonService.surveyInfo().then(res=>{ this.commonService.surveyInfo().then(res => {
if(res['success']){ if (res['success']) {
this.allQues = res['data']['survey'].pages this.allQues = res['data']['survey'].pages
} }
}) })
} }
reducePage() { reducePage() {
if(this.curPage>0){ if (this.curPage > 0) {
this.curPage-- this.curPage--
this.curPageData = this.allQues[this.curPage] this.curPageData = this.allQues[this.curPage]
}else{ } else {
return return
} }
} }
addPage() { addPage() {
if(this.curPage<16){ if (this.curPage < 16) {
this.curPage++ this.curPage++
this.curPageData = this.allQues[this.curPage] this.curPageData = this.allQues[this.curPage]
}else{ } else {
this.curPage = 0 this.curPage = 0
return; return
} }
console.log(this.curPage) console.log(this.curPage)
} }
......
import { Component, OnInit,Input} from '@angular/core';
import {Subscription} from 'rxjs';
import {DataService} from '../data.service';
@Component({
selector: 'app-askdetail',
templateUrl: './askdetail.component.html',
styleUrls: ['./askdetail.component.css']
})
export class AskdetailComponent implements OnInit {
@Input() curPageData: Array<any>;
questionList:Array<any>;
answerList:Array<any>;
subscription: Subscription;
constructor(
private dataService:DataService
) {
this.answerList = this.dataService.answerList;
this.subscription = dataService.answerList$.subscribe(
answerList => {
this.answerList = answerList;
});
}
ngOnInit() {
console.log(this.curPageData)
}
}
<div class="limbo">
<div class="title">
<img src="assets/images/bg_17.png">
</div>
</div>
\ No newline at end of file
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-limbo4',
templateUrl: './limbo4.component.html',
styleUrls: ['./limbo4.component.css']
})
export class Limbo4Component implements OnInit {
@Input() curPageData:Array<any>;
constructor() { }
ngOnInit() {
console.log(this.curPageData)
}
}
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">{{this.curPageData.questions[0].questionName}}</div>
<ul class="income">
<li class="selected" *ngFor="let options of this.curPageData.questions[0].options">
{{options.optionName}}
</li>
</ul>
<div class="questionTitle">{{this.curPageData.questions[1].questionName}}</div>
<ul class="income">
<li class="selected" *ngFor="let options of this.curPageData.questions[1].options">
{{options.optionName}}
</li>
</ul>
</div>
<!-- <div class="content_footer">
<div routerLink="/question4">&lt;</div>
<div routerLink="/question6" class="next">下一步</div>
</div> -->
</div>
</div>
\ No newline at end of file
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">
{{this.curPageData.questions[0].questionName.substring(0, 1)}}
<span> {{this.curPageData.questions[0].questionName.substring(1, 3)}}</span>
{{this.curPageData.questions[0].questionName.substring(3, 8)}}
</div>
<ul class="jobContent">
<li class="selected" *ngFor="let options of this.curPageData.questions[0].options">
{{options.optionName}}
</li>
</ul>
</div>
<!-- <div class="content_footer">
<div routerLink="/question7">&lt;</div>
<div routerLink="/question9" class="next">下一步</div>
</div> -->
</div>
</div>
\ No newline at end of file
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">{{this.curPageData.questions[0].questionName}}</div>
<ul class="jobContent">
<li class="selected" *ngFor="let options of this.curPageData.questions[0].options">
{{options.optionName}}
</li>
</ul>
<div class="questionTitle">{{this.curPageData.questions[1].questionName}}</div>
<ul class="jobContent">
<li class="selected" *ngFor="let options of this.curPageData.questions[1].options">
{{options.optionName}}
</li>
</ul>
</div>
<!-- <div class="content_footer">
<div routerLink="/question6">&lt;</div>
<div routerLink="/question8" class="next">下一步</div>
</div> -->
</div>
</div>
\ No newline at end of file
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">{{this.curPageData.questions[0].questionName}}</div>
<ul class="income">
<li class="selected" *ngFor="let options of this.curPageData.questions[0].options">
{{options.optionName}}
</li>
</ul>
<div class="questionTitle">{{this.curPageData.questions[1].questionName}}</div>
<ul class="income">
<li class="selected" *ngFor="let options of this.curPageData.questions[1].options">
{{options.optionName}}
</li>
</ul>
</div>
<!-- <div class="content_footer">
<div routerLink="/question5">&lt;</div>
<div routerLink="/question7" class="next">下一步</div>
</div> -->
</div>
</div>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PageSixComponent } from './page-six.component';
describe('PageSixComponent', () => {
let component: PageSixComponent;
let fixture: ComponentFixture<PageSixComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PageSixComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PageSixComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit ,Input} from '@angular/core';
@Component({
selector: 'app-page-six',
templateUrl: './page-six.component.html',
styleUrls: ['./page-six.component.css']
})
export class PageSixComponent implements OnInit {
@Input() curPageData: Array<any>
constructor() { }
ngOnInit() {
console.log(this.curPageData)
}
}
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">{{this.curPageData.questions[0].questionName}}</div>
<ul class="jobContent">
<li class="selected" *ngFor="let options of this.curPageData.questions[0].options">
{{options.optionName}}
</li>
</ul>
</div>
<!-- <div class="content_footer">
<div routerLink="/question9">&lt;</div>
<div routerLink="/question11" class="next">下一步</div>
</div> -->
</div>
</div>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PageTenComponent } from './page-ten.component';
describe('PageTenComponent', () => {
let component: PageTenComponent;
let fixture: ComponentFixture<PageTenComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PageTenComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PageTenComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit ,Input} from '@angular/core';
@Component({
selector: 'app-page-ten',
templateUrl: './page-ten.component.html',
styleUrls: ['./page-ten.component.css']
})
export class PageTenComponent implements OnInit {
@Input() curPageData: Array<any>
constructor() { }
ngOnInit() {
console.log(this.curPageData)
}
}
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">{{this.curPageData['pageName']}}</div>
<ul class="jobContent">
<li class="selected" *ngFor="let options of this.curPageData.questions[0].options">
{{options.optionName}}
</li>
</ul>
</div>
<!-- <div class="content_footer">
<div routerLink="/question2">&lt;</div>
<div routerLink="/question4" class="next">下一步</div>
</div> -->
</div>
</div>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PageThreeComponent } from './page-three.component';
describe('PageThreeComponent', () => {
let component: PageThreeComponent;
let fixture: ComponentFixture<PageThreeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PageThreeComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PageThreeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit,Input } from '@angular/core';
@Component({
selector: 'app-page-three',
templateUrl: './page-three.component.html',
styleUrls: ['./page-three.component.css']
})
export class PageThreeComponent implements OnInit {
@Input() curPageData: Array<any>
constructor() { }
ngOnInit() {
console.log(this.curPageData)
}
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PageTwoComponent } from './page-two.component';
describe('PageTwoComponent', () => {
let component: PageTwoComponent;
let fixture: ComponentFixture<PageTwoComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PageTwoComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PageTwoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit,Input } from '@angular/core';
import {CommonService} from '../common.service'
@Component({
selector: 'app-page-two',
templateUrl: './page-two.component.html',
styleUrls: ['./page-two.component.css']
})
export class PageTwoComponent implements OnInit {
@Input() curPageData: Array<any>
@Input()
isShow:boolean;
constructor(private commonService:CommonService) { }
questionList:Array<any>;
pageName:string;
optionsList:Array<any>;
ngOnInit() {
console.log(this.curPageData)
}
showToast(){
this.isShow = true;
}
closeToast(){
this.isShow = false;
}
}
<div class="limbo"> <div class="limbo">
<div class="title"> <div class="title">
<img src="assets/images/bg_1.png"> <img src="assets/images/bg_1.png" />
</div> </div>
<div class="tips"> <div class="tips">
<span style="color:red;">*</span> <span style="color:red;">*</span>
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
<!-- <div class="footer" routerLink="/question1"> <!-- <div class="footer" routerLink="/question1">
<div>获取家庭分析报告</div> <div>获取家庭分析报告</div>
</div> --> </div> -->
</div> </div>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AskdetailComponent } from './askdetail.component'; import { Page1Component } from './page1.component';
describe('AskdetailComponent', () => { describe('Page1Component', () => {
let component: AskdetailComponent; let component: Page1Component;
let fixture: ComponentFixture<AskdetailComponent>; let fixture: ComponentFixture<Page1Component>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ AskdetailComponent ] declarations: [ Page1Component ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(AskdetailComponent); fixture = TestBed.createComponent(Page1Component);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import { Component, OnInit, Input } from '@angular/core'
@Component({
selector: 'app-page1',
templateUrl: './page1.component.html',
styleUrls: ['./page1.component.css']
})
export class Page1Component implements OnInit {
@Input() curPageData: Array<any>
constructor() {}
ngOnInit() {}
}
<div class="limbo"> <div class="limbo">
<div class="title"> <div class="title">
<img src="assets/images/bg_6.png"> <img src="assets/images/bg_10.png" />
</div> </div>
</div> </div>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Limbo1Component } from './limbo1.component'; import { Page10Component } from './page10.component';
describe('Limbo1Component', () => { describe('Page10Component', () => {
let component: Limbo1Component; let component: Page10Component;
let fixture: ComponentFixture<Limbo1Component>; let fixture: ComponentFixture<Page10Component>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ Limbo1Component ] declarations: [ Page10Component ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(Limbo1Component); fixture = TestBed.createComponent(Page10Component);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import { Component, OnInit,Input } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core'
@Component({ @Component({
selector: 'app-limbo1', selector: 'app-page10',
templateUrl: './limbo1.component.html', templateUrl: './page10.component.html',
styleUrls: ['./limbo1.component.css'] styleUrls: ['./page10.component.css']
}) })
export class Limbo1Component implements OnInit { export class Page10Component implements OnInit {
@Input() curPageData: Array<any> @Input() curPageData: Array<any>
constructor() { } constructor() {}
ngOnInit() { ngOnInit() {
console.log(this.curPageData)
console.log(this.curPageData)
} }
} }
<div class="container"> <div class="container">
<div class="layout"> <div class="layout">
<div class="content"> <div class="content">
<div class="questionTitle hospitalTitle">{{this.curPageData.questions[0].questionName}}</div> <div class="questionTitle">
<ul class="jobContent"> {{ this.curPageData.questions[0].questionName }}
<li class="selected" *ngFor="let options of this.curPageData.questions[0].options"> </div>
{{options.optionName}} <ul class="jobContent">
</li> <li
</ul> class="selected"
</div> *ngFor="let options of this.curPageData.questions[0].options"
<!-- <div class="content_footer"> >
<div routerLink="/question10">&lt;</div> {{ options.optionName }}
<div routerLink="/question12" class="next">下一步</div> </li>
</div> --> </ul>
</div> </div>
</div>
</div> </div>
<div class="container"> <div class="container">
<div class="layout"> <div class="layout">
<div class="content"> <div class="content">
<div class="questionTitle smokeTitle">{{this.curPageData.questions[0].questionName}}</div> <div class="questionTitle">
<ul class="jobContent"> {{ this.curPageData.questions[0].questionName.substring(0, 1) }}
<li class="selected" *ngFor="let options of this.curPageData.questions[0].options"> <span>
{{options.optionName}} {{ this.curPageData.questions[0].questionName.substring(1, 3) }}</span
</li> >
</ul> {{ this.curPageData.questions[0].questionName.substring(3, 8) }}
</div> </div>
<!-- <div class="content_footer"> <ul class="jobContent">
<div routerLink="/question11">&lt;</div> <li
<div routerLink="/question13" class="next">下一步</div> class="selected"
</div> --> *ngFor="let options of this.curPageData.questions[0].options"
>
{{ options.optionName }}
</li>
</ul>
</div> </div>
</div>
</div> </div>
import { Component, OnInit ,Input} from '@angular/core'; import { Component, OnInit, Input } from '@angular/core'
@Component({ @Component({
selector: 'app-page12', selector: 'app-page12',
...@@ -7,10 +7,9 @@ import { Component, OnInit ,Input} from '@angular/core'; ...@@ -7,10 +7,9 @@ import { Component, OnInit ,Input} from '@angular/core';
}) })
export class Page12Component implements OnInit { export class Page12Component implements OnInit {
@Input() curPageData: Array<any> @Input() curPageData: Array<any>
constructor() { } constructor() {}
ngOnInit() { ngOnInit() {
console.log(this.curPageData) console.log(this.curPageData)
} }
} }
<div class="container"> <div class="container">
<div class="layout "> <div class="layout">
<div class="content"> <div class="content">
<div class="questionTitle">{{this.curPageData.questions[0].questionName}}</div> <div class="questionTitle">
<ul class="cityContent"> {{ this.curPageData.questions[0].questionName }}
<li *ngFor="let provinces of this.provinceList" (click)="showToast()"> </div>
{{provinces.provinceAbbr}} <ul class="jobContent">
</li> <li
</ul> class="selected"
</div> *ngFor="let options of this.curPageData.questions[0].options"
<!-- <div class="content_footer"> >
<div routerLink="/question13">&lt;</div> {{ options.optionName }}
<div routerLink="/question15" class="next">下一步</div> </li>
</div> --> </ul>
</div> </div>
<div class="toastWrapper toast" *ngIf="isShow"> </div>
<div class="toastContent"> </div>
<div class="live">所在地区</div>
<ul class="city">
<li class="selected" (click)="closeToast()">舟山市</li>
<li>台州市</li>
<li>宁波市</li>
<li>杭州市</li>
<li>温州市</li>
<li>嘉兴市</li>
<li>湖州市</li>
<li>绍兴市</li>
</ul>
</div>
</div>
</div>
\ No newline at end of file
import { Component, OnInit ,Input} from '@angular/core'; import { Component, OnInit, Input } from '@angular/core'
import { CommonService } from '../common.service'
@Component({ @Component({
selector: 'app-page13', selector: 'app-page13',
templateUrl: './page13.component.html', templateUrl: './page13.component.html',
...@@ -7,42 +6,10 @@ import { CommonService } from '../common.service' ...@@ -7,42 +6,10 @@ import { CommonService } from '../common.service'
}) })
export class Page13Component implements OnInit { export class Page13Component implements OnInit {
@Input() curPageData: Array<any> @Input() curPageData: Array<any>
isShow:boolean;
provinceList:Array<any>; constructor() {}
cityList:Array<any>;
provinceId:number;
constructor(private commonService:CommonService) { }
ngOnInit() { ngOnInit() {
console.log(this.curPageData) console.log(this.curPageData)
this.provinceqry()
}
showToast(){
this.isShow = true;
}
closeToast(){
this.isShow = false;
}
provinceqry(){
this.commonService.provinceqry({insurerId:14}).subscribe(res => {
if (res['success']) {
this.provinceList = res['data'].provinceList
console.log(this.provinceList)
}
})
}
getCityqry(){
const param = {
insurerId:14,
provinceId:this.provinceId
}
this.commonService.provinceqry(param).subscribe(res => {
if (res['success']) {
console.log(res)
}
})
} }
} }
<div class="container"> <div class="container">
<div class="layout"> <div class="layout">
<div class="content"> <div class="content">
<div class="questionTitle hospitalTitle">是否抽烟?(抽烟大于400支年,支年= 每日抽烟支数 * 烟龄)</div> <div class="questionTitle hospitalTitle">
<ul class="jobContent"> {{ this.curPageData.questions[0].questionName }}
<li class="selected"> </div>
本人 <ul class="jobContent">
</li> <li
<li> class="selected"
配偶 *ngFor="let options of this.curPageData.questions[0].options"
</li> >
<li> {{ options.optionName }}
</li>
</li> </ul>
</ul>
</div>
<!-- <div class="content_footer">
<div routerLink="/question13">&lt;</div>
<div routerLink="/question15" class="next">下一步</div>
</div> -->
</div> </div>
</div>
</div> </div>
<div class="container"> <div class="container">
<div class="layout "> <div class="layout">
<div class="content"> <div class="content">
<div class="questionTitle">您在哪个城市经常居住?</div> <div class="questionTitle smokeTitle">
<ul class="cityContent"> {{ this.curPageData.questions[0].questionName }}
<li class="selected"></li> </div>
<li></li> <ul class="jobContent">
<li></li> <li
<li></li> class="selected"
<li></li> *ngFor="let options of this.curPageData.questions[0].options"
<li></li> >
<li></li> {{ options.optionName }}
<li></li> </li>
<li></li> </ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<!-- <div class="content_footer">
<div routerLink="/question13">&lt;</div>
<div routerLink="/question15" class="next">下一步</div>
</div> -->
</div> </div>
</div>
</div> </div>
<div class="limbo"> <div class="container">
<div class="title"> <div class="layout ">
<img src="assets/images/bg_6.png"> <div class="content">
<div class="content_footer"> <div class="questionTitle">
<div routerLink="/question1">&lt;</div> {{ this.curPageData.questions[0].questionName }}
<div routerLink="/question3" class="next">下一步</div> </div>
<ul class="cityContent">
<li *ngFor="let provinces of this.provinceList" (click)="showToast()">
{{ provinces.provinceAbbr }}
</li>
</ul>
</div> </div>
</div>
<div class="toastWrapper toast" *ngIf="isShow">
<div class="toastContent">
<div class="live">所在地区</div>
<ul class="city">
<li class="selected" (click)="closeToast()">舟山市</li>
<li>台州市</li>
<li>宁波市</li>
<li>杭州市</li>
<li>温州市</li>
<li>嘉兴市</li>
<li>湖州市</li>
<li>绍兴市</li>
</ul>
</div>
</div>
</div> </div>
import { Component, OnInit } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core'
import { CommonService } from '../common.service'
@Component({ @Component({
selector: 'app-page16', selector: 'app-page16',
...@@ -6,10 +7,43 @@ import { Component, OnInit } from '@angular/core'; ...@@ -6,10 +7,43 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./page16.component.css'] styleUrls: ['./page16.component.css']
}) })
export class Page16Component implements OnInit { export class Page16Component implements OnInit {
@Input() curPageData: Array<any>
constructor() { } isShow: boolean
provinceList: Array<any>
cityList: Array<any>
provinceId: number
constructor(private commonService: CommonService) {}
ngOnInit() { ngOnInit() {
console.log(this.curPageData)
this.provinceqry()
}
showToast() {
this.isShow = true
}
closeToast() {
this.isShow = false
} }
provinceqry() {
this.commonService.provinceqry({ insurerId: 14 }).subscribe(res => {
if (res['success']) {
this.provinceList = res['data'].provinceList
console.log(this.provinceList)
}
})
}
getCityqry() {
const param = {
insurerId: 14,
provinceId: this.provinceId
}
this.commonService.provinceqry(param).subscribe(res => {
if (res['success']) {
console.log(res)
}
})
}
} }
<p> <div class="limbo">
page17 works! <div class="title">
</p> <img src="assets/images/bg_17.png" />
</div>
</div>
import { Component, OnInit } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core'
@Component({ @Component({
selector: 'app-page17', selector: 'app-page17',
...@@ -6,10 +6,10 @@ import { Component, OnInit } from '@angular/core'; ...@@ -6,10 +6,10 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./page17.component.css'] styleUrls: ['./page17.component.css']
}) })
export class Page17Component implements OnInit { export class Page17Component implements OnInit {
@Input() curPageData: Array<any>
constructor() { } constructor() {}
ngOnInit() { ngOnInit() {
console.log(this.curPageData)
} }
} }
.option_item {
.option_item{ display: flex;
display: flex; flex-wrap: wrap;
flex-wrap: wrap;
} }
.option_item li{ .option_item li {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content:center; justify-content: center;
flex: 0 0 50%; flex: 0 0 50%;
margin-bottom: 20%; margin-bottom: 20%;
} }
.option_item li img{ .option_item li img {
max-width: 55%; max-width: 55%;
} }
.option_item li img.selected{ .option_item li img.selected {
border: 1px solid #ff0000; border: 1px solid #ff0000;
border-radius: 50%; border-radius: 50%;
} }
<div class="layout"> <div class="layout">
<div class="content"> <div class="content">
<div class="questionTitle">{{this.curPageData['pageName']}}</div> <div class="questionTitle">{{ this.curPageData['pageName'] }}</div>
<ul class="option_item"> <ul class="option_item">
<li *ngFor="let options of this.curPageData.questions[0].options"> <li *ngFor="let options of this.curPageData.questions[0].options">
<img class="selected" src="assets/images/icon{{options.optionId}}.png" alt="{{options.optionName}}" > <img
<span>{{options.optionName}}</span> class="selected"
src="assets/images/icon{{ options.optionId }}.png"
alt="{{ options.optionName }}"
/>
<span>{{ options.optionName }}</span>
</li> </li>
</ul> </ul>
</div> </div>
<!-- <div class="content_footer">
<div routerLink="/index">&lt;</div>
<div routerLink="/question2" class="next">下一步</div>
</div> -->
</div> </div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Limbo2Component } from './limbo2.component'; import { Page2Component } from './page2.component';
describe('Limbo2Component', () => { describe('Page2Component', () => {
let component: Limbo2Component; let component: Page2Component;
let fixture: ComponentFixture<Limbo2Component>; let fixture: ComponentFixture<Page2Component>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ Limbo2Component ] declarations: [ Page2Component ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(Limbo2Component); fixture = TestBed.createComponent(Page2Component);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import { Component, OnInit,Input } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core'
@Component({ @Component({
selector: 'app-limbo2', selector: 'app-page2',
templateUrl: './limbo2.component.html', templateUrl: './page2.component.html',
styleUrls: ['./limbo2.component.css'] styleUrls: ['./page2.component.css']
}) })
export class Limbo2Component implements OnInit { export class Page2Component implements OnInit {
@Input() curPageData: Array<any> @Input() curPageData: Array<any>
constructor() { } constructor() {}
ngOnInit() { ngOnInit() {
console.log(this.curPageData) console.log(this.curPageData)
} }
} }
.ageContent{ @@ -1,46 +0,0 @@
display: flex; .ageContent {
flex-wrap: wrap; display: flex;
flex-wrap: wrap;
} }
.ageContent li{ .ageContent li {
width: 100%; width: 100%;
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
border-bottom: 1px solid #dcdcdc; border-bottom: 1px solid #dcdcdc;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.ageContent li span b{ .ageContent li span b {
margin-left: 10px; margin-left: 10px;
} }
.addChild{ .addChild {
/* display: flex; /* display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; */ align-items: center; */
width: 72%; width: 72%;
margin: 10% auto 0 auto; margin: 10% auto 0 auto;
text-align: center; text-align: center;
height: 70px; height: 70px;
line-height: 70px; line-height: 70px;
border:1px #ff0000 solid; border: 1px #ff0000 solid;
border-radius: 40px; border-radius: 40px;
position: relative; position: relative;
} }
.addChild div{ .addChild div {
float: left; float: left;
color: #ec2d37; color: #ec2d37;
font-size: 22px; font-size: 22px;
} }
.addChild div.icon{ .addChild div.icon {
font-weight: bold; font-weight: bold;
width: 50px; width: 50px;
height:50px; height: 50px;
border:2px #ec2d37 solid; border: 2px #ec2d37 solid;
border-radius:50%; border-radius: 50%;
font-size: 45px; font-size: 45px;
line-height:38px; line-height: 38px;
margin:3% 10% 0 10%; margin: 3% 10% 0 10%;
} }
<div class="layout"> <div class="layout">
<div class="content"> <div class="content">
<div class="questionTitle">{{this.curPageData['pageName']}}</div> <div class="questionTitle">{{ this.curPageData['pageName'] }}</div>
<ul class="ageContent"> <ul class="ageContent">
<li *ngFor="let optionsList of this.curPageData.questions"> <li *ngFor="let optionsList of this.curPageData.questions">
<div>{{optionsList.questionName}}</div> <div>{{ optionsList.questionName }}</div>
<b (click)="showToast()">&gt;</b> <b (click)="showToast()">&gt;</b>
</li> </li>
<!-- <li> </ul>
<div>您的年龄</div> </div>
<span>35<b (click)="showToast()">&gt;</b></span> <div class="addChild">
</li> <div class="icon">+</div>
<li> <div data-toggle="modal">增加孩子年龄</div>
<div>配偶的年龄</div> </div>
<span>35<b>&gt;</b></span> <div class="toastWrapper toast" *ngIf="isShow">
</li> <div class="toastContent">
<li> <ul>
<div>孩子的年龄</div> <li class="selected" (click)="closeToast()">60后</li>
<span>35<b>&gt;</b></span> <li>65后</li>
</li> --> <li>70后</li>
<li>75后</li>
<li>80后</li>
<li>85后</li>
<li>90后</li>
<li>95后</li>
</ul> </ul>
</div> </div>
<div class="addChild">
<div class="icon">+</div>
<div data-toggle="modal">增加孩子年龄</div>
</div>
<!-- <div class="content_footer">
<div routerLink="/question1">&lt;</div>
<div routerLink="/question3" class="next">下一步</div>
</div> -->
<div class="toastWrapper toast" *ngIf="isShow">
<div class="toastContent">
<ul>
<li class="selected" (click)="closeToast()">60后</li>
<li>65后</li>
<li>70后</li>
<li>75后</li>
<li>80后</li>
<li>85后</li>
<li>90后</li>
<li>95后</li>
</ul>
</div>
</div>
</div> </div>
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Limbo3Component } from './limbo3.component'; import { Page3Component } from './page3.component';
describe('Limbo3Component', () => { describe('Page3Component', () => {
let component: Limbo3Component; let component: Page3Component;
let fixture: ComponentFixture<Limbo3Component>; let fixture: ComponentFixture<Page3Component>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ Limbo3Component ] declarations: [ Page3Component ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(Limbo3Component); fixture = TestBed.createComponent(Page3Component);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import { Component, OnInit, Input } from '@angular/core'
@Component({
selector: 'app-page3',
templateUrl: './page3.component.html',
styleUrls: ['./page3.component.css']
})
export class Page3Component implements OnInit {
@Input() curPageData: Array<any>
isShow: boolean
constructor() {}
ngOnInit() {
console.log(this.curPageData)
}
showToast() {
this.isShow = true
}
closeToast() {
this.isShow = false
}
}
<div class="container"> <div class="container">
<div class="layout"> <div class="layout">
<div class="content"> <div class="content">
<div class="questionTitle">{{this.curPageData.questions[0].questionName}}</div> <div class="questionTitle">{{ this.curPageData['pageName'] }}</div>
<ul class="jobContent"> <ul class="jobContent">
<li class="selected" *ngFor="let options of this.curPageData.questions[0].options"> <li
{{options.optionName}} class="selected"
</li> *ngFor="let options of this.curPageData.questions[0].options"
</ul> >
</div> {{ options.optionName }}
<!-- <div class="content_footer"> </li>
<div routerLink="/question7">&lt;</div> </ul>
<div routerLink="/question9" class="next">下一步</div>
</div> -->
</div> </div>
</div> </div>
\ No newline at end of file </div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Limbo4Component } from './limbo4.component'; import { Page4Component } from './page4.component';
describe('Limbo4Component', () => { describe('Page4Component', () => {
let component: Limbo4Component; let component: Page4Component;
let fixture: ComponentFixture<Limbo4Component>; let fixture: ComponentFixture<Page4Component>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ Limbo4Component ] declarations: [ Page4Component ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(Limbo4Component); fixture = TestBed.createComponent(Page4Component);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import { Component, OnInit ,Input} from '@angular/core'; import { Component, OnInit, Input } from '@angular/core'
@Component({ @Component({
selector: 'app-limbo3', selector: 'app-page4',
templateUrl: './limbo3.component.html', templateUrl: './page4.component.html',
styleUrls: ['./limbo3.component.css'] styleUrls: ['./page4.component.css']
}) })
export class Limbo3Component implements OnInit { export class Page4Component implements OnInit {
@Input() curPageData: Array<any> @Input() curPageData: Array<any>
constructor() { } constructor() {}
ngOnInit() { ngOnInit() {
console.log(this.curPageData) console.log(this.curPageData)
} }
} }
<div class="container"> <div class="container">
<div class="layout"> <div class="layout">
<div class="content"> <div class="content">
<div class="questionTitle"> <div class="questionTitle">
{{this.curPageData['pageName'].substring(0, 1)}} {{ this.curPageData['pageName'].substring(0, 1) }}
<span>{{this.curPageData['pageName'].substring(1, 3)}}</span> <span>{{ this.curPageData['pageName'].substring(1, 3) }}</span>
{{this.curPageData['pageName'].substring(3,10)}} {{ this.curPageData['pageName'].substring(3, 10) }}
</div> </div>
<ul class="jobContent"> <ul class="jobContent">
<li class="selected" *ngFor="let options of this.curPageData.questions[0].options"> <li
{{options.optionName}} class="selected"
</li> *ngFor="let options of this.curPageData.questions[0].options"
</ul> >
</div> {{ options.optionName }}
<!-- <div class="content_footer"> </li>
<div routerLink="/question2">&lt;</div> </ul>
<div routerLink="/question4" class="next">下一步</div> </div>
</div> --> </div>
</div> </div>
</div>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PageEightComponent } from './page-eight.component'; import { Page5Component } from './page5.component';
describe('PageEightComponent', () => { describe('Page5Component', () => {
let component: PageEightComponent; let component: Page5Component;
let fixture: ComponentFixture<PageEightComponent>; let fixture: ComponentFixture<Page5Component>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ PageEightComponent ] declarations: [ Page5Component ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(PageEightComponent); fixture = TestBed.createComponent(Page5Component);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import { Component, OnInit ,Input} from '@angular/core'; import { Component, OnInit, Input } from '@angular/core'
@Component({ @Component({
selector: 'app-page-eight', selector: 'app-page5',
templateUrl: './page-eight.component.html', templateUrl: './page5.component.html',
styleUrls: ['./page-eight.component.css'] styleUrls: ['./page5.component.css']
}) })
export class PageEightComponent implements OnInit { export class Page5Component implements OnInit {
@Input() curPageData: Array<any> @Input() curPageData: Array<any>
constructor() { } constructor() {}
ngOnInit() { ngOnInit() {
console.log(this.curPageData) console.log(this.curPageData)
} }
} }
<div class="limbo"> <div class="limbo">
<div class="title"> <div class="title">
<img src="assets/images/bg_10.png"> <img src="assets/images/bg_6.png" />
</div> </div>
</div> </div>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PageFiveComponent } from './page-five.component'; import { Page6Component } from './page6.component';
describe('PageFiveComponent', () => { describe('Page6Component', () => {
let component: PageFiveComponent; let component: Page6Component;
let fixture: ComponentFixture<PageFiveComponent>; let fixture: ComponentFixture<Page6Component>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ PageFiveComponent ] declarations: [ Page6Component ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(PageFiveComponent); fixture = TestBed.createComponent(Page6Component);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import { Component, OnInit,Input } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core'
@Component({ @Component({
selector: 'app-page-five', selector: 'app-page6',
templateUrl: './page-five.component.html', templateUrl: './page6.component.html',
styleUrls: ['./page-five.component.css'] styleUrls: ['./page6.component.css']
}) })
export class PageFiveComponent implements OnInit { export class Page6Component implements OnInit {
@Input() curPageData: Array<any> @Input() curPageData: Array<any>
constructor() { } constructor() {}
ngOnInit() { ngOnInit() {
console.log(this.curPageData) console.log(this.curPageData)
} }
} }
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">
{{ this.curPageData.questions[0].questionName }}
</div>
<ul class="income">
<li
class="selected"
*ngFor="let options of this.curPageData.questions[0].options"
>
{{ options.optionName }}
</li>
</ul>
<div class="questionTitle">
{{ this.curPageData.questions[1].questionName }}
</div>
<ul class="income">
<li
class="selected"
*ngFor="let options of this.curPageData.questions[1].options"
>
{{ options.optionName }}
</li>
</ul>
</div>
</div>
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PageFourComponent } from './page-four.component'; import { Page7Component } from './page7.component';
describe('PageFourComponent', () => { describe('Page7Component', () => {
let component: PageFourComponent; let component: Page7Component;
let fixture: ComponentFixture<PageFourComponent>; let fixture: ComponentFixture<Page7Component>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ PageFourComponent ] declarations: [ Page7Component ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(PageFourComponent); fixture = TestBed.createComponent(Page7Component);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import { Component, OnInit,Input } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core'
@Component({ @Component({
selector: 'app-page-four', selector: 'app-page7',
templateUrl: './page-four.component.html', templateUrl: './page7.component.html',
styleUrls: ['./page-four.component.css'] styleUrls: ['./page7.component.css']
}) })
export class PageFourComponent implements OnInit { export class Page7Component implements OnInit {
@Input() curPageData: Array<any> @Input() curPageData: Array<any>
constructor() { } constructor() {}
ngOnInit() { ngOnInit() {
console.log(this.curPageData) console.log(this.curPageData)
} }
} }
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">
{{ this.curPageData.questions[0].questionName }}
</div>
<ul class="income">
<li
class="selected"
*ngFor="let options of this.curPageData.questions[0].options"
>
{{ options.optionName }}
</li>
</ul>
<div class="questionTitle">
{{ this.curPageData.questions[1].questionName }}
</div>
<ul class="income">
<li
class="selected"
*ngFor="let options of this.curPageData.questions[1].options"
>
{{ options.optionName }}
</li>
</ul>
</div>
</div>
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PageNineComponent } from './page-nine.component'; import { Page8Component } from './page8.component';
describe('PageNineComponent', () => { describe('Page8Component', () => {
let component: PageNineComponent; let component: Page8Component;
let fixture: ComponentFixture<PageNineComponent>; let fixture: ComponentFixture<Page8Component>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ PageNineComponent ] declarations: [ Page8Component ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(PageNineComponent); fixture = TestBed.createComponent(Page8Component);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import { Component, OnInit ,Input} from '@angular/core'; import { Component, OnInit, Input } from '@angular/core'
@Component({ @Component({
selector: 'app-page-nine', selector: 'app-page8',
templateUrl: './page-nine.component.html', templateUrl: './page8.component.html',
styleUrls: ['./page-nine.component.css'] styleUrls: ['./page8.component.css']
}) })
export class PageNineComponent implements OnInit { export class Page8Component implements OnInit {
@Input() curPageData: Array<any> @Input() curPageData: Array<any>
constructor() { } constructor() {}
ngOnInit() { ngOnInit() {
console.log(this.curPageData) console.log(this.curPageData)
} }
} }
<div class="container">
<div class="layout">
<div class="content">
<div class="questionTitle">
{{ this.curPageData.questions[0].questionName }}
</div>
<ul class="jobContent">
<li
class="selected"
*ngFor="let options of this.curPageData.questions[0].options"
>
{{ options.optionName }}
</li>
</ul>
<div class="questionTitle">
{{ this.curPageData.questions[1].questionName }}
</div>
<ul class="jobContent">
<li
class="selected"
*ngFor="let options of this.curPageData.questions[1].options"
>
{{ options.optionName }}
</li>
</ul>
</div>
</div>
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PageSevenComponent } from './page-seven.component'; import { Page9Component } from './page9.component';
describe('PageSevenComponent', () => { describe('Page9Component', () => {
let component: PageSevenComponent; let component: Page9Component;
let fixture: ComponentFixture<PageSevenComponent>; let fixture: ComponentFixture<Page9Component>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ PageSevenComponent ] declarations: [ Page9Component ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(PageSevenComponent); fixture = TestBed.createComponent(Page9Component);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
import { Component, OnInit ,Input} from '@angular/core'; import { Component, OnInit, Input } from '@angular/core'
@Component({ @Component({
selector: 'app-page-seven', selector: 'app-page9',
templateUrl: './page-seven.component.html', templateUrl: './page9.component.html',
styleUrls: ['./page-seven.component.css'] styleUrls: ['./page9.component.css']
}) })
export class PageSevenComponent implements OnInit { export class Page9Component implements OnInit {
@Input() curPageData: Array<any> @Input() curPageData: Array<any>
constructor() { } constructor() {}
ngOnInit() { ngOnInit() {
console.log(this.curPageData) console.log(this.curPageData)
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment