This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
exercise-card.component.ts 584 B
Newer Older
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { Exercise } from 'app/shared/model/exercise.model';

@Component({
  selector: 'jhi-exercise-card',
  templateUrl: './exercise-card.component.html',
  styleUrls: ['./exercise-card.component.scss'],
})
export class ExerciseCardComponent implements OnInit {
  @Input() exercise: Exercise | undefined;

  @Output() exerciseSelectionEvent = new EventEmitter<Exercise>();

  constructor() {}

  ngOnInit(): void {}

  selectExercise(): void {
    this.exerciseSelectionEvent.emit(this.exercise);
  }
}