Commit 77277cdb authored by Maxime REYROLLE's avatar Maxime REYROLLE

get data from services

parent ea14b359
import { Injectable } from '@angular/core';
import {Injectable} from '@angular/core';
import {AuthHttp} from 'angular2-jwt';
import {environment} from '../../../environments/environment';
@Injectable()
export class DashboardService {
private url = environment.apiUrl + '/local_governments';
constructor() { }
constructor(private authHttp: AuthHttp) {
}
getDataFromServices(local_government_id) {
return this.authHttp.get(this.url + '/' + local_government_id + '/services.json')
.map(response => response.json());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment