feat: add functionality for codes component (#309)

This commit is contained in:
Chirag Gupta
2018-10-14 18:58:32 +05:30
committed by Abhay Chawla
parent b517d015cc
commit 04ff1abcc4
8 changed files with 136 additions and 10 deletions
+28
View File
@@ -0,0 +1,28 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { HttpClient, HttpParams } from '@angular/common/http';
/** rxjs Imports */
import { Observable } from 'rxjs';
/**
* System service.
*/
@Injectable({
providedIn: 'root'
})
export class SystemService {
/**
* @param {HttpClient} http Http Client to send requests.
*/
constructor(private http: HttpClient) { }
/**
* @returns {Observable<any>} Fetches Codes.
*/
getCodes(): Observable<any> {
return this.http.get('/codes');
}
}