I am getting the following error for a service: Uncaught Error: Can't resolve all parameters for FormFlowService: (AnnounceObjectService, ?)
I have no red lines coming up and I have declared the service in my app module. Does any one know the reason? Note I am using FormService in other services without this error.
My service looks like:
import { Injectable } from '@angular/core';
import { FormService } from './form.service';
import { FormFlow, FormFlowTask, FormTaskReference, FormTaskAssign, FormTask, FormTaskState, FormTaskAssignActive } from './form';
import { AnnounceObjectService } from '../../../shared/services/announce-object/announce-object.service';
import * as _ from "lodash"; //Will be red but stil works
import { Subscription } from 'rxjs/Subscription';
@Injectable()
export class FormFlowService {
subscription: Subscription;
tasks: FormFlowTask[];
taskReference: FormTaskReference;
flow: FormFlow;
stateList: FormTaskState[];
taskList: FormTask[];
assignList: FormTaskAssign[];
stateListBase: number;
assignListBase: number;
isQueFlow: boolean;
constructor(private announceObjectService: AnnounceObjectService, private formService: FormService) {
}
}
App Module:
@NgModule({
declarations: [
AppComponent
],
entryComponents: [
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
routing,
MaterialModule.forRoot(),
FlexLayoutModule.forRoot()
],
providers: [
{ provide: LOCALE_ID, useValue: 'en-AU' },
AUTH_PROVIDERS,
FormService,
FormFlowService,
FormElementService,
AnnounceObjectService
],
bootstrap: [AppComponent]
})