src/app/modules/core/services/content/content.service.ts
Service to provides CRUD methods to make content api request by extending DataService.
constructor(config: any, http: HttpClient)
|
constructor
Parameters :
|
baseUrl |
baseUrl: |
base Url for content api |
Public config |
config: |
reference of config service. |
Public http |
http: |
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;
}
}