Commit 9440bdd8 by Tuukka Kivilahti

merge request fixes

1 parent cdf83bdf
Pipeline #74 failed
in 0 seconds
import { UserService } from './shared/services/user.service';
import { ErrorInterceptor } from './shared/interceptors/error.interceptor';
import { MoyaLocaleService } from './components/moya-locale/moya-locale.service';
import { LocaleService } from './components/moya-locale/locale.service';
import { CacheService } from './shared/services/cache.service';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
......@@ -49,7 +49,7 @@ import {ApolloModule} from "apollo-angular";
],
providers: [
CacheService,
MoyaLocaleService,
LocaleService,
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
UserService,
......
......@@ -19,7 +19,7 @@ const LOCALSTORAGE_NAME = 'currently used locale code';
@Injectable()
export class MoyaLocaleService {
export class LocaleService {
selectedLocale: string;
......
import { Component, OnInit } from '@angular/core';
import {DEFAULT_LOCALE, ENGLISH, FINNISH, MoyaLocaleService, SWEDISH} from './moya-locale.service';
import {DEFAULT_LOCALE, ENGLISH, FINNISH, LocaleService, SWEDISH} from './locale.service';
@Component({
selector: 'moya-locale',
......@@ -12,7 +12,7 @@ export class MoyaLocaleComponent implements OnInit {
svSelected = true;
enSelected = true;
constructor(private localeService: MoyaLocaleService) { }
constructor(private localeService: LocaleService) { }
ngOnInit() {
this.localeService.getUserLocale().subscribe(locale => { this.updateFlagStatus(locale); } );
......
import { TestBed, inject } from '@angular/core/testing';
import { MoyaLocaleService } from './moya-locale.service';
import { LocaleService } from './locale.service';
describe('MoyaLocaleService', () => {
describe('LocaleService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [MoyaLocaleService]
providers: [LocaleService]
});
});
it('should be created', inject([MoyaLocaleService], (service: MoyaLocaleService) => {
it('should be created', inject([LocaleService], (service: LocaleService) => {
expect(service).toBeTruthy();
}));
});
......@@ -10,7 +10,7 @@ import {TranslatePipe} from "@ngx-translate/core";
styleUrls: ['./left-menu.component.scss'],
providers: [TranslatePipe]
})
export class LeftMenuComponent implements OnInit {
export class LeftMenuComponent {
menu: MenuGroup[];
styleClass: string;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!