Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

145
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda