Blame view

src/services/road.service.ts 597 Bytes
ad296a58   Yarik   Road
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  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[] {
366f081e   Yarik   Filters
18
       return json.roadEditDsM as Road[];
ad296a58   Yarik   Road
19
20
21
22
23
    };
    protected parseModel(json: any): any {
       return json as Road;
    };
  }