I added ng2-translate to my angular-cli project. It's work well in localhost but when I try to run it from ng build prod, I got 404 not found:
http://MySite/assets/i18n/en.json Failed to load resource: the server responded with a status of 404 (Not Found)
The file exist in this path, but not found by the browser.
I added this providerto app.module.ts:
providers: [ { provide: TranslateLoader, useFactory: (http: Http) => new TranslateStaticLoader(http, 'assets/i18n', '.json'), deps: [Http] }]
Maybe I should have to add some declaration to angular-cli.json? but what?