import { Injectable } from '@angular/core' ; import { Response } from '@angular/http' ; import { Observable } from 'rxjs/Observable' ; import { HttpInterceptorService , RESTService } from '@covalent/http' ; import { MOCK_API } from '../config/api.config' ; export interface IFeature { title : string ; id : string ; user : string ; modified : Date ; created : Date ; icon : string ; enabled : number ; } @ Injectable ( ) export class FeaturesService extends RESTService < IFeature > { constructor ( private _http ) { super ( _http , { baseUrl : MOCK_API , path : '/features' , } ) ; } staticQuery ( ) { return this . _http . get ( 'data/features.json' ) . map ( ( res ) => { return res . json ( ) ; } ) ; } }