         return pendingTemplate()
 
     link = ($scope, $el, $attrs) ->
+        $ctrl = $el.controller()
+
         if not $attrs.tgMembershipsMemberActions?
             return $log.error "MembershipsMemberActionsDirective: the directive need a member"
 

        html = render(member)
        $el.html(html)

        $scope.$on "$destroy", ->
            $el.off()

    return {link: link}


module.directive("tgMembershipsMemberActions", ["$log", MembershipsMemberActionsDirective])


#############################################################################

    ]

    constructor: (@scope, @rootScope, @repo, @confirm, @rs, @params, @q, @location) ->
        @scope.sectionName = "Memberships" #i18n
        @scope.project = {}
        @scope.filters = {}

        promise = @.loadInitialData()
        promise.then null, ->
