Hello, I am currently running an angular application by using the 'ng serve' command. I encountered the following error:
ERROR in src/app/accounts/account-form/account-form.component.ts(29,3): error TS2305: Module '"/home/prasanth/primecastworkspace3/primecast-web/src/app/shared/services/index"' has no exported member 'ModeService'.
This is a snippet from my account-form.component.ts file:
import {
AuthenticationService,
FeaturesService,
AddressProfilesService,
FlightsService,
MarketPropositionService
} from '../../shared/services';
@Component({
selector: 'pc-account-form',
templateUrl: './account-form.component.html',
styleUrls: ['./account-form.component.scss']
})
export class AccountFormComponent implements OnInit {
}
The index.ts file contains the following exports:
export * from './accounts.service';
export * from './address-profiles.service';
export * from './authentication.service';
...
export * from './market-proposition.service';
<p>In addition, here is the market-proposition.service.ts file:</p>
<pre><code>import { HttpClient } from '@angular/common/http';
import { Injectable, OnInit } from '@angular/core';
import { AppConfig } from '../models';
...
@Injectable()
export class MarketPropositionService {
config: AppConfig = this.configService.config;
constructor(
private httpClient: HttpClient,
private configService: ConfigService
) {}
get() {
return this.httpClient
.get<MarketProposition>(`${this.config.api}/find-market-proposition`)
.pipe(shareReplay(1));
}
}
I am trying to inject a market proposition service object into my account-form.component.ts. Previously, I had the ModeService class declared in a different file, but since refactoring, I have been encountering this error. Any assistance would be greatly appreciated.