for (var i = 'A', k = 1; i <= 'Z', k <= $scope.noOfColumns; i = $scope.nextChar(i), k++)
{
for (var j = 1; j <= $scope.noOfSeatsperRow; j++)
{
seats += '<div id=' + i + '' + j + ' class="seat" ng-click="selectOrDeselect($event)">'+ i + '' + j + '</div>';
if (j == $scope.noOfSeatsperRow)
{
seats += '<br />';
}
if (j == $scope.noOfSeatsperRow/2)
{
seats += '<div class="gap"></div>';
}
}
}
angular.element(document.getElementsByClassName("seats")).html(seats);
Here I am appending some HTML to pre-existing element. The problem is whenever I click ng-click
event should invoke but it is not happening
I tried by giving statically in the view using for loop of razor there I can get the ng-click
event invoked
What was the problem and how can I overcome with this?