File

app/core/services/taxonomy-services/taxonomy.service.ts

Index

Properties

Properties

Id
Id: string
Type : string
Key
Key: string
Type : string
Value
Value: string
Type : string
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/internal/Observable';
import { PublicationService } from '../publication-service/publication.service';
import { HttpClient } from '@angular/common/http';
import { AppConfig } from 'src/app/app.config';

export interface TaxonomySchema {
  Key: string;
  Value: string;
  Id: string;
}

@Injectable({
  providedIn: 'root'
})
export class TaxonomyService {

  constructor(public publicationService: PublicationService, public httpClient: HttpClient) { }

  public getTaxonomyData(...values: string[]): Observable<TaxonomySchema> {
    
    const pubPath = this.publicationService.getPublicationPath();
    let taxonomyTypePath = '';
    values.forEach((val, index) => {
      taxonomyTypePath += val + '/';
    });
    const requestUrl = AppConfig.settings.taxonomyService.path.replace('/PUBLICATIONPATH', pubPath) + taxonomyTypePath;
    return this.httpClient.get<TaxonomySchema>(requestUrl);
  }
 

}

result-matching ""

    No results matching ""