15 lines
349 B
TypeScript
15 lines
349 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { HttpClient } from '@angular/common/http';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class TranslationService {
|
|
|
|
constructor(private http: HttpClient) { }
|
|
getTranslation(text: String)
|
|
{
|
|
return this.http.get('https://api.mymemory.translated.net/get?q='+text+'&langpair=en|cs');
|
|
}
|
|
}
|