Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

143
Views
AngularJs: Display HTML elements from string variable in JSP page

I'm using AngularJs and I need to render into a JSP page the HTML elements that are into a string variable in the Controller as below:

$scope.myVar = "<h1>Title</h1><p>More information <a href="linkhere">Click here</a></p>";
    

So in JSP page I have something like:

<div class="panel-body">
    {{myVar}}
</div>

But the UI only prints the plain text of the variable. How can I solve this situation?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use AngularJs ng-bind-html directive to render HTML. ( Docs )

<div class="panel-body" ng-bind-html="myvar"></div>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!