I searched on this issue too much here on stackoverflow, there were similar ones but none helpful and tried almost everything. The problem is :
I have an application in which I am using angular js to bind events like load more(pagination),"add to cart" etc etc .
I am not using routes to load templates. It is simply a grails application with ng-app in gsp and I am rendering template from server on ajax $http request.
When the page is loaded first time, view with model(data) is coming at once, so events are just working fine. But when I "load more" data with $http service and append to current DOM, event binding does not work. Even jquery click events are not working .
I am using this to bind data :
$('#itemsSpace').append($compile(response.data)($scope));
if(!$scope.$$phase) {
$scope.$apply()
}
Where response is server response with html data.
Any guesses ? Any more explanations needed ?
Thanks!