You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In issue ngx-translate#25@mlegenhausen pointed out a solution that shows a very common use-case for a custom TranslateLoader implementation.
Maybe we can extend the readme to show this (and maybe other use-cases in the future)?
Kind regards :)
Copy file name to clipboardExpand all lines: README.md
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -69,3 +69,47 @@ export function HttpLoaderFactory(http: HttpClient) {
69
69
```
70
70
71
71
For now this loader only support the json format.
72
+
73
+
## Custom TranslateLoader strategies
74
+
### HashTranslateLoader - Hashing translation files with angular-cli, webpack and SystemJS
75
+
Allow caching of translation files by the browser could help to speed up the initial load of your app but with the default setup your translation files could miss the latest changes because the cache doesn't have the latest version of your translation file yet.
76
+
77
+
When using the angular-cli (uses webpack under the hood) you can write your own `TranslateLoader` that always loads the latest translation file available during your application build.
0 commit comments