road.service.ts
597 Bytes
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import { StatementBaseService } from './statement.base.service';
import { Road } from '../models/road';
@Injectable()
export class RoadService extends StatementBaseService {
protected url: string = 'http://localhost:5000/road';
constructor(protected http: Http) {
super(http);
}
public createModel(): Object {
return new Road();
}
protected parseModels(json: any): any[] {
return json.roadEditDsM as Road[];
};
protected parseModel(json: any): any {
return json as Road;
};
}