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

113
Vistas
Issue with ng-click event not firing for HTML rendered from SQL Server database

I render a button saved from SQL Server database. View source for the button looks like the following -

<button id="btn" class="mainBtn" ng-click="OpenBtn('btn')" >Do something</button>

This button is part of a MainDiv which looks like following -

<div id="MainDIV"  ng-bind-html="MainDIVHTML">

I assign MainDIVHTML value as follows -

 $scope.MainDIVHTML= $sce.trustAsHtml(entity.MainDIVHTML);

Where entity.MainDIVHTML is the saved HTML from database.

mainBtn is inside the entity.MainDIVHTML

The saved HTML and the page where I am using saved HTML share the Angular.js controller.

I am not able to execute - ng-click="OpenBtn('btn')" event.

The markup (HTML) is shown correctly though.

about 4 years ago · Juan Pablo Isaza
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