I try to inject a template html from an angular controller. I searched how to use $compile. So, I programmed that but it doesn't work:
CustomersCtrl.$inject = ['$scope', '$http', '$location', '$modal', '$templateCache', '$window', '$compile'];
function CustomersCtrl($scope, $http, $location, $modal, $window, $compile) {
var htmlContent = $('#pagination');
htmlContent.load('Partials/Customers/pagination.html');
$compile(htmlContent.contents())($scope);}
The error is :
TypeError: $compile is not a function
All help is welcome.