Click here to Skip to main content
15,913,773 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
{{ testimonial.TestimonialText }}<small class="by-line"><i>{{ testimonial.CoupleName }}</i>
<br/>
    <span class="location">{{ testimonial.CoupleLocation }}</span>
</small>


What I have tried:

for {{ testimonial.TestimonialText}} gives text output with html tags in it i want the html to be interpreted in browser but they
are being shown in browser i have tried to interpret with jquery but failed to do so and i tried to use @HTML.Raw but that is razor syntax which can't be used on angular tag i am new to angular and don't know how to get around this.
Posted
v2
Comments
Karthik_Mahalingam 17-Sep-16 3:30am    
post a screenshot
Anurag Sharma 18-Sep-16 6:21am    
Can you share the content present within testimonial.TestimonialText?

1 solution

If the content present in testimonial.TestimonialText is HTML text. Please initialize the testimonial.TestimonialText using $sce. Here's a sample syntax -

.controller( SampleCtrl , function($sce){
     $scope.testimonial.TestimonialText = $sce.trustAsHtml(someHtmlVar);
})
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900