File

src/app/modules/core/services/content/content.service.ts

Description

Service to provides CRUD methods to make content api request by extending DataService.

Constructor

constructor(config: any, http: HttpClient)

constructor

Parameters :
  • config : ConfigService

    ConfigService reference

  • http : HttpClient

    HttpClient reference

Properties

baseUrl
baseUrl: string

base Url for content api

Public config
config: any

reference of config service.

Public http
http: HttpClient

reference of lerner service.

import { ConfigService } from '@sunbird/shared';
import { DataService } from './../data/data.service';
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { CollectionHierarchyAPI } from '../../interfaces';

/**
 * Service to provides CRUD methods to make content api request by extending DataService.
 *
 */
@Injectable({
  providedIn: 'root'
})
export class ContentService extends DataService {
  /**
   * base Url for content api
   */
  baseUrl: string;
  /**
   * reference of config service.
   */
  public config: ConfigService;
  /**
   * reference of lerner service.
   */
  public http: HttpClient;
  /**
   * constructor
   * @param {ConfigService} config ConfigService reference
   * @param {HttpClient} http HttpClient reference
   */
  constructor(config: ConfigService, http: HttpClient) {
    super(http);
    this.config = config;
    this.baseUrl = this.config.urlConFig.URLS.CONTENT_PREFIX;
  }

}

results matching ""

    No results matching ""