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

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

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

  ngOnInit() {
  }

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