Last active
December 28, 2015 05:59
-
-
Save tastywheat/7454102 to your computer and use it in GitHub Desktop.
angular transclude
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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