File

src/app/root/companies/companies.service.ts

Index

Methods

Constructor

constructor(http: AuthHttp)
Parameters :
Name Type Optional Description
http AuthHttp

Methods

getCompaniesList
getCompaniesList()
Returns : Observable<[]>
import { Injectable } from '@angular/core';
import {AuthHttp} from "../../core/auth/auth-http.service";
import {Observable} from "rxjs";
import {Company} from "../../core/models/auth/company.model";

@Injectable()
export class CompaniesService {

  constructor(private http: AuthHttp) { }

  getCompaniesList(): Observable<Company[]> {
    return this.http.get('auth/api/v1/companies/all').map(rs => rs.json())
  }
}

results matching ""

    No results matching ""