当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript DomSanitizationService.bypassSecurityTrustHtml方法代码示例

本文整理汇总了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);
        }
    }
开发者ID:Geaz,项目名称:SharpDox.Plugins.Html,代码行数:8,代码来源:member.component.ts

示例2:

 .then((response) => {
   const posts = response.json()
   for (const post of posts) {
     post.content.rendered = this.sanitizer.bypassSecurityTrustHtml(post.content.rendered)
   }
   return posts
 })
开发者ID:likr,项目名称:wpapi-angular2-example,代码行数:7,代码来源:post.service.ts

示例3: transform

  transform(value: string, args: any[]) {

    if(!value)
      return value;

    return this.sanitizer.bypassSecurityTrustHtml(value);
  }
开发者ID:ottman,项目名称:front-1,代码行数:7,代码来源:safe.ts

示例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();
     }        
 } 
开发者ID:Geaz,项目名称:SharpDox.Plugins.Html,代码行数:8,代码来源:article.component.ts

示例5: transform

  transform(value) {
    if (isBlank(value)) return value;
    if (!isString(value)) {
      throw new InvalidPipeArgumentException(JsonPointerEscapePipe, value);
    }

    return this.sanitizer.bypassSecurityTrustHtml(value);
  }
开发者ID:ajeetkanojia,项目名称:ReDoc,代码行数:8,代码来源:pipes.ts

示例6: transform

 transform(_sValue: string) {
     return this.oSanitizer.bypassSecurityTrustHtml((new showdown.Converter()).makeHtml(_sValue));
 }
开发者ID:MarHai,项目名称:stuperman,代码行数:3,代码来源:markdown.pipe.ts

示例7: getPostContent

 getPostContent(content: any): any {
   return this.sanitizer.bypassSecurityTrustHtml(content);
 }
开发者ID:Pariston,项目名称:postmemo,代码行数:3,代码来源:postpage.component.ts

示例8: transform

 transform(v: string) : SafeHtml {
    return this._sanitizer.bypassSecurityTrustHtml(v); 
 } 
开发者ID:GECOR,项目名称:playas-velez,代码行数:3,代码来源:sanitize.ts


注:本文中的@angular/platform-browser.DomSanitizationService.bypassSecurityTrustHtml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。