import { Injectable } from "@angular/core" ; import { HttpClient } from "@angular/common/http" ; @ Injectable ( ) export class OptionHelperReaderService { constructor ( private http ) { } public get ( markdownTemplate ) { return new Promise < string > ( ( resolve , reject ) => { this . http . get ( markdownTemplate , { responseType : "text" } ) . subscribe ( markdownData => { resolve ( markdownData ) ; } , error => { reject ( error ) ; } ) ; } ) ; } }