Skip to content

Instantly share code, notes, and snippets.

@mbenford
Last active December 29, 2015 05:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbenford/7623472 to your computer and use it in GitHub Desktop.
Save mbenford/7623472 to your computer and use it in GitHub Desktop.
AngularJS directive that re-creates the old ngTransclude behavior
app.directive('ngTranscludeAppend', function() {
return function(scope, element, attrs, ctrl, transcludeFn) {
if (!transcludeFn) return;
transcludeFn(function(clone) {
element.append(clone);
});
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment