import { Component, OnInit } from '@angular/core';
import { Subject } from "../subject.model";
import { SubjectService } from "../subject.service";

@Component({
  selector: 'app-subject-for-student',
  templateUrl: './subject-for-student.component.html',
  styleUrls: ['./subject-for-student.component.css']
})
export class SubjectForStudentComponent implements OnInit {
  subjects?: Subject[];

  constructor(private subjectService: SubjectService) {
  }

  ngOnInit(): void {
    this.subjectService.getSubjects().subscribe((result) => this.subjects = result);
  }

}
