Skip to content

Commit

Permalink
Fix demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Zefling committed Dec 23, 2024
1 parent d4d1a88 commit 53e6032
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dist/ng-select2/browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@

<body>
<app-root></app-root>
<link rel="modulepreload" href="chunk-FMHQTHM6.js"><link rel="modulepreload" href="chunk-TWHHM5EC.js"><link rel="modulepreload" href="chunk-33O7KYOH.js"><link rel="modulepreload" href="chunk-PBM5R43U.js"><link rel="modulepreload" href="chunk-IUSK23HG.js"><link rel="modulepreload" href="chunk-7IHFBV5J.js"><link rel="modulepreload" href="chunk-S5UJW4WF.js"><link rel="modulepreload" href="chunk-EQDQRRRY.js"><script src="polyfills-EONH2QZO.js" type="module"></script><script src="main-QYR7HWTW.js" type="module"></script></body>
<link rel="modulepreload" href="chunk-FMHQTHM6.js"><link rel="modulepreload" href="chunk-TWHHM5EC.js"><link rel="modulepreload" href="chunk-33O7KYOH.js"><link rel="modulepreload" href="chunk-PBM5R43U.js"><link rel="modulepreload" href="chunk-IUSK23HG.js"><link rel="modulepreload" href="chunk-7IHFBV5J.js"><link rel="modulepreload" href="chunk-S5UJW4WF.js"><link rel="modulepreload" href="chunk-EQDQRRRY.js"><script src="polyfills-EONH2QZO.js" type="module"></script><script src="main-5S5PNWJE.js" type="module"></script></body>
</html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions src/app/transloco-loader.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { inject, Injectable } from "@angular/core";
import { Translation, TranslocoLoader } from "@jsverse/transloco";
import { HttpClient } from "@angular/common/http";
import { HttpClient } from '@angular/common/http';
import { Injectable, inject } from '@angular/core';

import { Translation, TranslocoLoader } from '@jsverse/transloco';

@Injectable({ providedIn: 'root' })
export class TranslocoHttpLoader implements TranslocoLoader {
private http = inject(HttpClient);

getTranslation(lang: string) {
return this.http.get<Translation>(`/assets/i18n/${lang}.json`);
return this.http.get<Translation>(`./assets/i18n/${lang}.json`);
}
}
14 changes: 7 additions & 7 deletions transloco.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {TranslocoGlobalConfig} from '@jsverse/transloco-utils';
import { TranslocoGlobalConfig } from '@jsverse/transloco-utils';

const config: TranslocoGlobalConfig = {
rootTranslationsPath: 'src/assets/i18n/',
langs: [ 'en', 'fr' ],
keysManager: {}
rootTranslationsPath: '/src/assets/i18n/',
langs: ['en', 'fr'],
keysManager: {},
};
export default config;

export default config;

0 comments on commit 53e6032

Please sign in to comment.