Skip to content

Instantly share code, notes, and snippets.

@JMWebDevelopment
Created December 19, 2016 02:53
Show Gist options
  • Save JMWebDevelopment/7624eb6e6a7108a4d1aa9e9415195354 to your computer and use it in GitHub Desktop.
Save JMWebDevelopment/7624eb6e6a7108a4d1aa9e9415195354 to your computer and use it in GitHub Desktop.
.directive('member', function ($compile) {
return {
restrict: "E",
replace: true,
scope: {
member: '='
},
templateUrl: myLocalized.partials + 'comments.html',
link: function (scope, element, attrs) {
var collectionSt = '<collection collection="member.comment_children"></collection>';
if (angular.isArray(scope.member.comment_children)) {
$compile(collectionSt)(scope, function(cloned, scope) {
console.log(cloned);
element.append(cloned);
});
}
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment