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() {
return {
restrict: 'E',
link: function(scope, linkElement) {
var contents = Array.prototype.slice.apply(linkElement.parent().contents());
var commentNode = contents.filter(function(node) {
// This selects a comment node
return node.nodeType === 8;
});
link: function(scope, linkElement) {
var contents = Array.prototype.slice.apply(linkElement.parent().contents());
var commentNode = contents.filter(function(node) {
// This selects a comment node
return node.nodeType === 8;
});
var children = linkElement.children();
$(commentNode[0]).nextAll().remove();
$(commentNode[0]).after(children);
}
var children = linkElement.children();
$(commentNode[0]).nextAll().remove();
$(commentNode[0]).after(children);
}
};
}