 
     return {link:link}
 
-module.directive("tgMemberships", ["$tgTemplate", MembershipsDirective])
+module.directive("tgMemberships", ["$tgTemplate", "$compile", MembershipsDirective])
 
 
 #############################################################################

        return @rs.memberships.list(@scope.projectId, httpFilters).then (data) =>
            @scope.memberships = _.filter(data.models, (membership) ->
                                    membership.user == null or membership.is_user_active)
            @scope.page = data.current
            @scope.count = data.count
            @scope.paginatedBy = data.paginatedBy

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

            html = template(options)
            html = $compile(html)($scope)

            $pagEl.html(html)
            $pagEl.show()

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