I get html entities from json file, like: ’
How can I unescape it in html component?
I created custom pipe, but it works only for entities like &
:
import { Pipe, PipeTransform } from '@angular/core';
import {unescape} from 'lodash';
@Pipe({
name: 'unescape'
})
export class UnescapePipe implements PipeTransform {
transform(value: any, args?: any): any {
return unescape(value);
}
}
- I'm working with Angular 5.