I binded html data from angular js post to Html div, but not ng click is fired in the binding html content.
This is my binding html div.
<div ng-app="SupportManagement">
<div ng-controller="SupportCtrl">
<div ng-click="openModal(5)"></div>
<div id="detailBlock"></div>
</div>
</div>
This my bind function with Angularjs Post
angular.module("SupportManagement", [])
.controller("SupportCtrl", function ($scope, $http) {
$scope.openModal = function (ticketId) {
$http.get('SupportDetail.aspx?ticketId='+ticketId).then(function (response) {
$("#detailBlock").html(response.data);
},
function (error) {
alert("fail");
alert(error);
}
);
}
$scope.openTicketHistory=function(){
var id= $('#tckId').attr('prob');
$http.post('SupportDetail.aspx/ShowHistory',
{ ticketId: id }).then(function (success) {
alert("success")
}
);
}
});
The place is I call the openTicketHistory function inside detailBlock div. And not firing the ngClick event. What can I do?