This article is now published on my website: Prefer Subshells for Context.
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
angular.module('myApp').directive('addthisToolbox', ['$timeout', function($timeout) { | |
return { | |
restrict : 'A', | |
transclude : true, | |
replace : true, | |
template : '<div ng-transclude></div>', | |
link : function($scope, element, attrs) { | |
$timeout(function () { | |
addthis.init(); | |
addthis.toolbox($(element).get(), {}, { |