Skip to content

Instantly share code, notes, and snippets.

@amandeepmittal
Created August 9, 2018 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amandeepmittal/d4af2141f5bc2fb4e4a56b17c6c70cf5 to your computer and use it in GitHub Desktop.
Save amandeepmittal/d4af2141f5bc2fb4e4a56b17c6c70cf5 to your computer and use it in GitHub Desktop.
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Injectable()
export class TableService {
constructor(private http: HttpClient) { }
url = 'http://localhost:4000';
getData() {
return this
.http
.get(`${this.url}/employees`);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment