diff --git a/src/main/webapp/app/course/manage/course-lti-configuration/course-lti-configuration.component.ts b/src/main/webapp/app/course/manage/course-lti-configuration/course-lti-configuration.component.ts index d92f4719d383..9886968247c3 100644 --- a/src/main/webapp/app/course/manage/course-lti-configuration/course-lti-configuration.component.ts +++ b/src/main/webapp/app/course/manage/course-lti-configuration/course-lti-configuration.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Course } from 'app/entities/course.model'; import { OnlineCourseConfiguration } from 'app/entities/online-course-configuration.model'; @@ -12,6 +12,10 @@ import { SortService } from 'app/shared/service/sort.service'; templateUrl: './course-lti-configuration.component.html', }) export class CourseLtiConfigurationComponent implements OnInit { + private route = inject(ActivatedRoute); + private sortService = inject(SortService); + private courseManagementService = inject(CourseManagementService); + protected readonly Object = Object; course: Course; @@ -29,12 +33,6 @@ export class CourseLtiConfigurationComponent implements OnInit { faExclamationTriangle = faExclamationTriangle; faWrench = faWrench; - constructor( - private route: ActivatedRoute, - private sortService: SortService, - private courseManagementService: CourseManagementService, - ) {} - /** * Gets the configuration for the course encoded in the route and fetches the exercises */ diff --git a/src/main/webapp/app/course/manage/course-lti-configuration/edit-course-lti-configuration.component.ts b/src/main/webapp/app/course/manage/course-lti-configuration/edit-course-lti-configuration.component.ts index ed940d582462..df480a6941c1 100644 --- a/src/main/webapp/app/course/manage/course-lti-configuration/edit-course-lti-configuration.component.ts +++ b/src/main/webapp/app/course/manage/course-lti-configuration/edit-course-lti-configuration.component.ts @@ -1,4 +1,4 @@ -import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { Course } from 'app/entities/course.model'; import { finalize } from 'rxjs'; @@ -19,6 +19,11 @@ import { combineLatest } from 'rxjs'; templateUrl: './edit-course-lti-configuration.component.html', }) export class EditCourseLtiConfigurationComponent implements OnInit { + private route = inject(ActivatedRoute); + private courseService = inject(CourseManagementService); + private router = inject(Router); + private ltiConfigurationService = inject(LtiConfigurationService); + @ViewChild('scrollableContent') scrollableContent: ElementRef; course: Course; @@ -37,13 +42,6 @@ export class EditCourseLtiConfigurationComponent implements OnInit { faBan = faBan; faSave = faSave; - constructor( - private route: ActivatedRoute, - private courseService: CourseManagementService, - private router: Router, - private ltiConfigurationService: LtiConfigurationService, - ) {} - /** * Gets the configuration for the course encoded in the route and prepares the form */