import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, Router} from "@angular/router";
import {CommonService} from "../common.service";

@Component({
  selector: 'app-transit2',
  templateUrl: './transit2.component.html',
  styleUrls: ['./transit2.component.css']
})
export class Transit2Component implements OnInit {
  // 家庭结构
  type: any;

  constructor(private router: Router,
              private commonService: CommonService,
              private route: ActivatedRoute) {
    this.type = this.route.snapshot.queryParams['type'];
  }

  ngOnInit() {
  }

  next() {
    this.router.navigate(['/health'], {queryParams: {type: this.type}});
  }

  //  上一步
  before() {
    this.commonService.before();
  }
}
