openaire-library/utils/pipes/HTMLToString.pipe.ts

14 lines
345 B
TypeScript
Raw Normal View History

import {Pipe, PipeTransform} from '@angular/core';
import {SafeUrl} from '@angular/platform-browser';
import {StringUtils} from '../string-utils.class';
@Pipe({ name: 'htmlToString'})
export class HTMLToStringPipe implements PipeTransform {
constructor() {}
transform(value):SafeUrl {
return StringUtils.HTMLToString(value);
}
}