




'use strict';

import { Injectable, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
//import 'rxjs/Rx';
import {map} from 'rxjs/operator/map';

// Common data service
@Injectable()
export class DataSvc {
    http: HttpClient;

    constructor( @Inject(HttpClient) http: HttpClient) {
        this.http = http;
    }

    // get chart data
    getData() {
        var data;
        
        //data = this.http.get('data/fb.json').map(res => res.json());
        data = this.http.get('data/fb.json');
        return data;
    }
}
