I am experiencing an issue with a specific file containing the following code:
import { Injectable } from '@angular/core';
import { I18n } from '@ngx-translate/i18n-polyfill';
import { isNumber } from 'lodash';
import { ConfirmationService, MessageService } from 'primeng/api';
export enum ConfirmationType {
Delete,
Navigate,
Unsaved,
}
export enum SuccessMessage {
Cloned,
Created,
Deleted,
Saved,
Reverted,
}
@Injectable()
export class MessagingService {
constructor(
private readonly _i18n: I18n,
// tslint:disable-next-line:ban-types
private readonly _messageService: MessageService,
private readonly _confirmationService: ConfirmationService,
) { }
However, when attempting to run this code, I encounter the following error:
Error: Cannot instantiate cyclic dependency! MessagingService