 ## Member Avatar Directive
 #############################################################################
 
-MembershipsDirective = ($template) ->
+MembershipsDirective = ($template, $compile) ->
     template = $template.get("admin/admin-membership-paginator.html", true)
 
     linkPagination = ($scope, $el, $attrs, $ctrl) ->

                else
                    pages.push({classes: "page", num: i, type: "page"})

            $pagEl.html(template(options))

        $scope.$watch "memberships", (value) ->
            # Do nothing if value is not logical true

            $confirm.askOnDelete(title, message).then (finish) ->
                onSuccess = ->
                    finish()

                    if $scope.page > 1 && ($scope.count - 1) <= $scope.paginatedBy
                        $ctrl.selectFilter("page", $scope.page - 1)

                    $ctrl.loadMembers()

                    text = $translate.instant("ADMIN.MEMBERSHIP.SUCCESS_DELETE")
