I'm using ng2-translate with angular2 and it's working really well. The point is I just updated angular to RC4 yesterday and I have a problem with the ng2-translate module I guess.
I have this error:
Unhandled Promise rejection: Error: Invalid provider - only instances of Provider and Type are allowed, got: [object Object]
Here is my main.ts:
// On injecte les services dont on aura besoin partout ici comme ça nous réutilisons la même instance
bootstrap(GuichetAppComponent, [
guichetAppRouterProviders,
CefEventDispatcherService,
CefService,
LoggerService,
TimerService,
Renderer,
HTTP_PROVIDERS,
{
provide: TranslateLoader,
useFactory: (http: Http) => new TranslateStaticLoader(http, 'app/assets/i18n', '.json'),
deps: [Http]
},
TranslateService,
CurrentVMService,
LangueService,
BoutonActionService,
CompteService,
InfosGuichetService
]).catch((err: any) => console.log(err));
If i remove the provide section and translateservice it's working fine.
Thanks guys.