cohort-detail.component.ts 590B

12345678910111213141516171819202122232425
  1. import { Component, OnInit } from '@angular/core';
  2. import { ActivatedRoute } from '@angular/router';
  3. import { ICohort } from 'app/shared/model/cohort.model';
  4. @Component({
  5. selector: 'jhi-cohort-detail',
  6. templateUrl: './cohort-detail.component.html'
  7. })
  8. export class CohortDetailComponent implements OnInit {
  9. cohort: ICohort;
  10. constructor(private activatedRoute: ActivatedRoute) {}
  11. ngOnInit() {
  12. this.activatedRoute.data.subscribe(({ cohort }) => {
  13. this.cohort = cohort;
  14. });
  15. }
  16. previousState() {
  17. window.history.back();
  18. }
  19. }