This commit is contained in:
Joe Fiorini
2015-05-13 13:05:05 -04:00
parent a207d1234b
commit e79540fbba

View File

@@ -49,16 +49,16 @@
export default function() { export default function() {
return { return {
restrict: 'E', restrict: 'E',
link: function(scope, linkElement) { link: function(scope, linkElement) {
var contents = Array.prototype.slice.apply(linkElement.parent().contents()); var contents = Array.prototype.slice.apply(linkElement.parent().contents());
var commentNode = contents.filter(function(node) { var commentNode = contents.filter(function(node) {
// This selects a comment node // This selects a comment node
return node.nodeType === 8; return node.nodeType === 8;
}); });
var children = linkElement.children(); var children = linkElement.children();
$(commentNode[0]).nextAll().remove(); $(commentNode[0]).nextAll().remove();
$(commentNode[0]).after(children); $(commentNode[0]).after(children);
} }
}; };
} }