Skip to content

Instantly share code, notes, and snippets.

@tkutcher
Created January 10, 2022 02:18
Show Gist options
  • Save tkutcher/0699d708552497acd562b1e892d66da4 to your computer and use it in GitHub Desktop.
Save tkutcher/0699d708552497acd562b1e892d66da4 to your computer and use it in GitHub Desktop.
import { environment } from "../../environments/environment";
@Injectable({ providedIn: "root" })
export class MyApiService {
constructor(private http: HttpClient) {}
getFoo(): Observable<any> {
return this.http.get(`${environment.apiAddress}/foo`);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment