Skip to content
Snippets Groups Projects
student-dashboard.component.ts 982 B
import {Component, OnDestroy, OnInit} from '@angular/core';
import {Observable} from 'rxjs';
import {OmpClass} from 'src/app/dao/omp-class';
import {StudentInfoService} from 'src/app/StudentComponents/student-info.service';

@Component({
  selector: 'app-student-dashboard',
  templateUrl: './student-dashboard.component.html',
  styleUrls: ['./student-dashboard.component.css']
})
export class StudentDashboardComponent implements OnInit, OnDestroy {

  public studentId: String;
  private isAlive = true;
  private classes$: Observable<OmpClass[]>;


  constructor(private studentInfoService: StudentInfoService) {}


  ngOnInit(): void {
    // this.classes$ = this.route.paramMap.pipe(
    //   switchMap(params => {
    //     this.studentId = params.get('id');
    //     return this.studentInfoService.getClasses(this.studentId);
    //   })
    // );
  }

  ngOnDestroy(): void {
  }

  public getClassList() {
    this.studentInfoService.getUserClasses('student2');
  }

}