Commit 4a09cd9e by sweet

增加教育培训

parent 73a535d2
import { SafeHtmlPipe } from './safe-html.pipe';
describe('SafeHtmlPipe', () => {
it('create an instance', () => {
const pipe = new SafeHtmlPipe();
expect(pipe).toBeTruthy();
});
});
import {Pipe, PipeTransform} from '@angular/core';
import {DomSanitizer} from '@angular/platform-browser';
@Pipe({
name: 'safeHtml'
})
export class SafeHtmlPipe implements PipeTransform {
constructor(private sanitized: DomSanitizer) {
}
transform(value: any, args?: any): any {
return this.sanitized.bypassSecurityTrustHtml(value);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment