Commit 872f0c3e by Chao Sun

style: rename page

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