I\'ve been trying to switch my app over to AoT compilation and have been getting this error in the production environment when the app is loading (it works fine locally).
Fixed this by providing the IconService in a different way.
{
provide: IconService,
useFactory: iconServiceFactory,
deps: [Http, IconConfiguror],
},
and the factory itself
export function iconServiceFactory(http: Http, iconConfiguror: IconConfiguror) {
return new IconService(http, iconConfiguror);
}
I guess for some reason the Http wasn't being provided (even though HttpModule was imported) so I had to declare it as a dependency.