﻿ngGridDirectives.directive('ngHeaderCell', ['$compile', function($compile) {
    var ngHeaderCell = {
        scope: false,
        compile: function() {
            return {
                pre: function($scope, iElement) {
                    iElement.append($compile($scope.col.headerCellTemplate)($scope));
                }
            };
        }
    };
    return ngHeaderCell;
}]);
﻿ngGridDirectives.directive('ngHeaderCell', ['$compile', function($compile) {
    var ngHeaderCell = {
        scope: false,
        compile: function() {
            return {
                pre: function($scope, iElement) {
                    iElement.append($compile($scope.col.headerCellTemplate)($scope));
                    // put $scope back on the element so element.scope() works even when
                    // $compileProvider.debugInfoEnabled(false);
                    iElement.data('$scope', $scope);
                }
            };
        }
    };
    return ngHeaderCell;
}]);

Make columns reorderable when debug false
Make columns reorderable when debug false

When $compileProvider.debugInfoEnabled(false) then element.scope() doesn't work. As a workaround, put $scope back on each header element.

https://docs.angularjs.org/api/ng/function/angular.element