Skip to content

Instantly share code, notes, and snippets.

@tastywheat
Last active December 28, 2015 05:59
Show Gist options
  • Save tastywheat/7454102 to your computer and use it in GitHub Desktop.
Save tastywheat/7454102 to your computer and use it in GitHub Desktop.
angular transclude
.directive('stinky', function(){
return {
transclude: true,
template: "<div>hello <span ng-transclude></span></div>",
link: function($scope, $element, $attributes, $compile){
}
};
})
//Usage
//<span stinky>brian</span>
//Result
//hello brian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment