diff --git a/src/main/webapp/app/faq/faq.routes.ts b/src/main/webapp/app/faq/faq.routes.ts index 0b756a8c28ff..88b75dbdb00f 100644 --- a/src/main/webapp/app/faq/faq.routes.ts +++ b/src/main/webapp/app/faq/faq.routes.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpResponse } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve } from '@angular/router'; import { Observable, of } from 'rxjs'; @@ -8,7 +8,7 @@ import { Faq } from 'app/entities/faq.model'; @Injectable({ providedIn: 'root' }) export class FaqResolve implements Resolve { - constructor(private faqService: FaqService) {} + private faqService = inject(FaqService); resolve(route: ActivatedRouteSnapshot): Observable { const faqId = route.params['faqId']; diff --git a/src/main/webapp/app/faq/faq.service.ts b/src/main/webapp/app/faq/faq.service.ts index 8542fd814c49..2b8e8a5dd546 100644 --- a/src/main/webapp/app/faq/faq.service.ts +++ b/src/main/webapp/app/faq/faq.service.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@angular/core'; +import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @@ -12,7 +12,7 @@ type EntityArrayResponseType = HttpResponse; export class FaqService { public resourceUrl = 'api/courses'; - constructor(protected http: HttpClient) {} + private http = inject(HttpClient); create(courseId: number, faq: Faq): Observable { const copy = FaqService.convertFaqFromClient(faq);