Laravel.io
	module.directive('member', function ($compile) {
		var LOOP = '<li><a data-target="#" >{{member.title}}</a></li>';

		return {
			restrict: "E",
			replace: true,
			scope: {
				member: '='
			},
			template: LOOP,
			link: function (scope, element, attrs) {
				// console.log(scope.member.children);
				if (angular.isArray(scope.member.children)) {
					element.addClass('dropdown');
					element.children().attr('data-toggle', 'dropdown').attr('role', 'button').attr('aria-expandee', 'false');
					element.children().addClass('dropdown-toggle').append('<span class="caret"></span>');
					$compile('<ul class="dropdown-menu" role="menu"><member ng-repeat="val in member.children" member="val"></member></ul>')(scope, function(cloned, scope){
					   element.append(cloned);
					});
				}
			},
		}
	});

Please note that all pasted data is publicly available.