Created
December 19, 2016 02:53
-
-
Save JMWebDevelopment/7624eb6e6a7108a4d1aa9e9415195354 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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