Safe value must use [property]=binding after bypass security with DomSanitizer

Discussão em 'Angular' iniciado por manish kumar, Julho 2, 2025.

  1. manish kumar

    manish kumar Guest

    <!--HTML CODE-->
    <p #mass_timings></p>



    //Controller code

    @ViewChild('mass_timings') mass_timings: ElementRef;
    constructor(private domSanitizer:DomSanitizer)
    getInnerHTMLValue(){
    this.mass_timings.nativeElement.innerHTML =
    this.domSanitizer.bypassSecurityTrustHtml(this.parishDetail.mass_timings);

    }


    but the output which the mass_timings is displaying is including the text:-


    Safe value must use [property]=binding
    ​

    at the beginning

    How to remove this string.

    Continue reading...

Compartilhe esta Página