Skip to content

Instantly share code, notes, and snippets.

@DrMabuse23
Created September 21, 2014 09:50
Show Gist options
  • Save DrMabuse23/3f030d5e1a4f35957372 to your computer and use it in GitHub Desktop.
Save DrMabuse23/3f030d5e1a4f35957372 to your computer and use it in GitHub Desktop.
var ngTranscludeDirective = ngDirective({
restrict: 'EAC',
link: function($scope, $element, $attrs, controller, $transclude) {
if (!$transclude) {
throw minErr('ngTransclude')('orphan',
'Illegal use of ngTransclude directive in the template! ' +
'No parent directive that requires a transclusion found. ' +
'Element: {0}',
startingTag($element));
}
$transclude(function(clone) {
$element.empty();
$element.append(clone);
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment