ngx-admin/docs/app/@theme/services/article.service.ts

14 lines
355 B
TypeScript
Raw Normal View History

2021-09-24 15:56:10 +03:00
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
@Injectable()
export class NgxArticleService {
constructor(private http: HttpClient) { }
getArticle(source: string): Observable<string> {
return this.http.get(`articles/${source}`, { responseType: 'text' });
}
}