本文整理汇总了TypeScript中@angular/platform-browser.DomSanitizationService.bypassSecurityTrustHtml方法的典型用法代码示例。如果您正苦于以下问题:TypeScript DomSanitizationService.bypassSecurityTrustHtml方法的具体用法?TypeScript DomSanitizationService.bypassSecurityTrustHtml怎么用?TypeScript DomSanitizationService.bypassSecurityTrustHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@angular/platform-browser.DomSanitizationService
的用法示例。
在下文中一共展示了DomSanitizationService.bypassSecurityTrustHtml方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: ngOnInit
ngOnInit(){
this.showCode = sharpDox.projectData.showCode;
this.member.linkedSyntaxSanitized = this._sanitizer.bypassSecurityTrustHtml(this.member.linkedSyntax);
if(this.member.type == "method"){
this.member.sequenceDiagramSanitized = this._sanitizer.bypassSecurityTrustHtml(this.member.sequenceDiagram);
}
}
示例2:
.then((response) => {
const posts = response.json()
for (const post of posts) {
post.content.rendered = this.sanitizer.bypassSecurityTrustHtml(post.content.rendered)
}
return posts
})
示例3: transform
transform(value: string, args: any[]) {
if(!value)
return value;
return this.sanitizer.bypassSecurityTrustHtml(value);
}
示例4: notify
notify(state : State) : void {
var currentPageData = state["SiteStateChanger.currentPageData"];
if(state.changedKeys.indexOf("SiteStateChanger.currentPageData") > -1 && currentPageData !== undefined){
this.currentPageData = state["SiteStateChanger.currentPageData"];
this.currentPageData.contentSanitized = this.sanitizer.bypassSecurityTrustHtml(this.currentPageData.content);
super.setChanged();
}
}
示例5: transform
transform(value) {
if (isBlank(value)) return value;
if (!isString(value)) {
throw new InvalidPipeArgumentException(JsonPointerEscapePipe, value);
}
return this.sanitizer.bypassSecurityTrustHtml(value);
}
示例6: transform
transform(_sValue: string) {
return this.oSanitizer.bypassSecurityTrustHtml((new showdown.Converter()).makeHtml(_sValue));
}
示例7: getPostContent
getPostContent(content: any): any {
return this.sanitizer.bypassSecurityTrustHtml(content);
}
示例8: transform
transform(v: string) : SafeHtml {
return this._sanitizer.bypassSecurityTrustHtml(v);
}