Created
September 15, 2022 04:30
-
-
Save odhiambo123/00b1fdc42245feaef430ae562baec188 to your computer and use it in GitHub Desktop.
adding products
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import {HttpClient} from '@angular/common/http'; | |
import {Observable} from "rxjs"; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class DataService { | |
BASE_URL = 'https://apolis-grocery.herokuapp.com/api' | |
constructor(private http: HttpClient) { } | |
getCategories(): Observable<any> { | |
return this.http.get<any>(`${this.BASE_URL}/category`) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment