Skip to content

Commit

Permalink
Development: Migrate plagiarism-case-student-detail-view.component.ts…
Browse files Browse the repository at this point in the history
… dependency injection from constructor to inject
  • Loading branch information
xHadie committed Nov 29, 2024
1 parent 6a5ceb5 commit 33e892c
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { Component, OnDestroy, OnInit, ViewChild, inject } from '@angular/core';
import { PlagiarismCase } from 'app/exercises/shared/plagiarism/types/PlagiarismCase';
import { PlagiarismCasesService } from 'app/course/plagiarism-cases/shared/plagiarism-cases.service';
import { ActivatedRoute, Params, RouterLink } from '@angular/router';
Expand Down Expand Up @@ -28,6 +28,10 @@ import { ArtemisSharedCommonModule } from 'app/shared/shared-common.module';
imports: [TranslateDirective, FaIconComponent, RouterLink, MetisModule, ArtemisSharedComponentModule, ArtemisSharedCommonModule],
})
export class PlagiarismCaseStudentDetailViewComponent implements OnInit, OnDestroy {
protected metisService = inject(MetisService);
private plagiarismCasesService = inject(PlagiarismCasesService);
private activatedRoute = inject(ActivatedRoute);

@ViewChild('post') postComponent: PostComponent;
readonly ButtonType = ButtonType;

Expand All @@ -51,12 +55,6 @@ export class PlagiarismCaseStudentDetailViewComponent implements OnInit, OnDestr

readonly dayjs = dayjs;

constructor(
protected metisService: MetisService,
private plagiarismCasesService: PlagiarismCasesService,
private activatedRoute: ActivatedRoute,
) {}

ngOnInit(): void {
this.paramSubscription = combineLatest({
ancestorParams: this.activatedRoute.parent!.parent!.params,
Expand Down

0 comments on commit 33e892c

Please sign in to comment.