authority.service.ts 637 Bytes
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';

import { StatementBaseService } from './statement.base.service';

import { Authority } from '../models/authority';

@Injectable()
export class AuthorityService extends StatementBaseService {
  protected url: string = 'http://localhost:5000/authority';
  constructor(protected http: Http) {
    super(http);
  }
  public createModel(): Object {
    return new Authority();
  }
  protected parseModels(json: any): any[] {
     return json.authorityEditDsM as Authority[];
  };
  protected parseModel(json: any): any {
     return json as Authority;
  };
}