function compile() {
                var html;
                $scope.collection = myCollection;
                $scope.showList = false;
                html = '<div ng-if="showList">' +
                    '<ul class="list"><li dir-paginate="item in collection | itemsPerPage: 10">{{ item }}</li></ul> ' +
                    '</div>' +
                    '<dir-pagination-controls></dir-pagination-controls>';
                containingElement.append($compile(html)($scope));
                $scope.$apply();
            }
Issue raised here https://github.com/michaelbromley/angularUtils/issues/78
Where the dir-paginate directive is inside an ngSwitch block (which is initially hidden), so the linking function is not immediately executed.
The dir-pagination-controls directive is *outside* the switch block, so it gets both compiled *and* linked on page load.