Projekt

Obecné

Profil

Stáhnout (781 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
/* tslint:disable */
2
/* eslint-disable */
3
import { Injectable } from '@angular/core';
4
import { HttpClient } from '@angular/common/http';
5
import { ApiConfiguration } from './api-configuration';
6

    
7
/**
8
 * Base class for services
9
 */
10
@Injectable()
11
export class BaseService {
12
  constructor(
13
    protected config: ApiConfiguration,
14
    protected http: HttpClient
15
  ) {
16
  }
17

    
18
  private _rootUrl: string = '';
19

    
20
  /**
21
   * Returns the root url for all operations in this service. If not set directly in this
22
   * service, will fallback to `ApiConfiguration.rootUrl`.
23
   */
24
  get rootUrl(): string {
25
    return this._rootUrl || this.config.rootUrl;
26
  }
27

    
28
  /**
29
   * Sets the root URL for API operations in this service.
30
   */
31
  set rootUrl(rootUrl: string) {
32
    this._rootUrl = rootUrl;
33
  }
34
}
(3-3/7)