Guest User

Untitled

a guest
Mar 13th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
  2. import { TranslateHttpLoader } from '@ngx-translate/http-loader';
  3. import { HttpClientModule, HttpClient } from '@angular/common/http';
  4.  
  5. export const createTranslateLoader = (http: HttpClient) => {
  6. return new TranslateHttpLoader(http, './assets/i18n/', '.json');
  7. };
  8. TranslateModule.forRoot({
  9. loader: {
  10. provide: TranslateLoader,
  11. useFactory: createTranslateLoader,
  12. deps: [HttpClient]
  13. }
  14. }),
  15.  
  16. ERROR in /home/practicas/projects/admin-panel/src/app/app.component.ts (17,3): Multiple constructor implementations are not allowed.
  17. ERROR in /home/practicas/projects/admin-panel/src/app/app.component.ts (28,3): Multiple constructor implementations are not allowed.
  18. ERROR in /home/practicas/projects/admin-panel/src/app/app.module.ts (4,9): Duplicate identifier 'HttpClientModule'.
  19. ERROR in /home/practicas/projects/admin-panel/src/app/app.module.ts (37,10): Duplicate identifier 'HttpClientModule'.
  20. ERROR in Error: Metadata version mismatch for module /home/practicas/projects/admin-panel/node_modules/@ngx-translate/core/core.d.ts, found version 4, expected 3, resolving symbol AppModule in /home/practicas/projects/admin-panel/src/app/app.module.ts, resolving symbol AppModule in /home/practicas/projects/admin-panel/src/app/app.module.ts, resolving symbol AppModule in /home/practicas/projects/admin-panel/src/app/app.module.ts
  21. at syntaxError (/home/practicas/projects/admin-panel/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
  22. at simplifyInContext (/home/practicas/projects/admin-panel/node_modules/@angular/compiler/bundles/compiler.umd.js:25111:23)
  23. at StaticReflector.simplify (/home/practicas/projects/admin-panel/node_modules/@angular/compiler/bundles/compiler.umd.js:25123:13)
  24. at StaticReflector.annotations (/home/practicas/projects/admin-panel/node_modules/@angular/compiler/bundles/compiler.umd.js:24553:41)
  25. at _getNgModuleMetadata (/home/practicas/projects/admin-panel/node_modules/@angular/compiler-cli/src/ngtools_impl.js:138:31)
  26. at _extractLazyRoutesFromStaticModule (/home/practicas/projects/admin-panel/node_modules/@angular/compiler-cli/src/ngtools_impl.js:109:26)
  27. at Object.listLazyRoutesOfModule (/home/practicas/projects/admin-panel/node_modules/@angular/compiler-cli/src/ngtools_impl.js:53:22)
  28. at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/home/practicas/projects/admin-panel/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39)
  29. at AotPlugin._getLazyRoutesFromNgtools (/home/practicas/projects/admin-panel/node_modules/@ngtools/webpack/src/plugin.js:207:44)
  30. at _donePromise.Promise.resolve.then.then.then.then.then (/home/practicas/projects/admin-panel/node_modules/@ngtools/webpack/src/plugin.js:443:24)
  31. at <anonymous>
  32. at process._tickCallback (internal/process/next_tick.js:118:7)
Add Comment
Please, Sign In to add comment