Angular 显示后端返回的 html 安全转换的管道

2020-5-25 Jon angular

核心代码 管道 ts 代码 import {Pipe, PipeTransform} from '@angular/core'; import {DomSanitizer} from '@angular/platform-browser'; @Pipe({ name: 'safeHtml' }) export class SafeHtmlPipe implements PipeTransform { constructor(private sanitized: DomSanitizer) {}

阅读全文>>

标签: html angular 管道 pipe safe safeHtml

评论(0) 浏览(3065)

皖ICP备15010162号-1 ©2015-2022 知向前端
qq:1614245331 邮箱:13515678147@163.com Powered by emlog sitemap