feat: add templates component (#509)
- Add templates component - Add templates module - Add templates service Fixes: #486
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
* Templates service.
|
||||
*/
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TemplatesService {
|
||||
|
||||
/**
|
||||
* @param {HttpClient} http Http Client to send requests.
|
||||
*/
|
||||
constructor(private http: HttpClient) { }
|
||||
|
||||
/**
|
||||
* @returns {Observable<any>} Templates data
|
||||
*/
|
||||
getTemplates(): Observable<any> {
|
||||
return this.http.get('/templates');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user