Skip to content

Instantly share code, notes, and snippets.

@wharley
Created February 10, 2017 18:16
Show Gist options
  • Save wharley/d22633c196cbcb0e243c15c3cb891dac to your computer and use it in GitHub Desktop.
Save wharley/d22633c196cbcb0e243c15c3cb891dac to your computer and use it in GitHub Desktop.
import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import { FunctionComponent } from './function.component';
@Injectable()
export class FunctionService {
constructor(public http: Http) { };
getFunctions() {
return this.http.get("/listFuncaoAll")
.map( (res:Response) => res.json());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment