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