Skip to content

Commit

Permalink
Extend comment for constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
PaRangger committed Nov 27, 2024
1 parent 701bc14 commit 2925c0d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/webapp/app/shared/pipes/artemis-translate.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ import { TranslatePipe, TranslateService } from '@ngx-translate/core';
export class ArtemisTranslatePipe implements PipeTransform, OnDestroy {
private translatePipe: TranslatePipe;

// We cannot inject() ChangeDetectorRef here
/**
* We cannot inject() ChangeDetectorRef here, since this is a pipe (other than a component where its possible)
* However, in this case due to being a wrapper class for TranslatePipe, which implements the same constructor
* this exception should be okay.
*/
constructor(translateService: TranslateService, changeDetectorRef: ChangeDetectorRef) {
this.translatePipe = new TranslatePipe(translateService, changeDetectorRef);
}
Expand Down

0 comments on commit 2925c0d

Please sign in to comment.