Error loading json
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] bug report => check the FAQ and search github for a similar issue or PR before submitting
Current behavior Unable to set folder. provide, useFactory and deps are undefined TranslateModule.forRoot({ provide: TranslateLoader, useFactory: (http: Http) => new TranslateStaticLoader(http, ‘/i18n’, ‘.json’), deps: [Http] })
Expected/desired behavior Should able to get file. I don’t know it loads i18n in url
Reproduction of the problem If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:btpW3l0jr5beJVjohy1Q).
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
-
ng2-translate version: x.x.x
-
Angular version: 2.0.0-rc.X
-
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
-
Language: [all | TypeScript X.X | ES6/7 | ES5]
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top GitHub Comments
It tries to load the translation file from
i18n
instead of fromassets/i18n
. Make sure you configured the translate loader correctly. See the documentation.Sorry I have missed { }