You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
argos/dmp-frontend/src/app/services/language/language.service.ts

28 lines
873 B
TypeScript

import { HttpHeaders } from '@angular/common/http';
5 years ago
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
5 years ago
import { environment } from '../../../environments/environment';
import { Language } from '../../models/language/Language';
5 years ago
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
6 years ago
@Injectable()
export class LanguageService {
private actionUrl: string;
private headers: HttpHeaders;
6 years ago
constructor(private http: BaseHttpService) {
6 years ago
5 years ago
this.actionUrl = environment.Server + 'common/';
6 years ago
this.headers = new HttpHeaders();
this.headers = this.headers.set('Content-Type', 'application/json');
this.headers = this.headers.set('Accept', 'application/json');
}
6 years ago
public getLang(): Observable<Language[]> {
return this.http.get<Language[]>(this.actionUrl + 'language', { headers: this.headers });
}
6 years ago
}