<p>{{ lesson?.description | replaceHtmlTags }}</p>
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({ name: 'replaceHtmlTags' })
export class ReplaceHtmlTagsPipe implements PipeTransform {
transform(html: string): string {
return html.replace(/<\/?[^>]+(>|$)/g, '');
}
}
@NgModule({
declarations: [ReplaceHtmlTagsPipe],
// ...
})
export class AppModule { }