I\'m trying to use the AddThis javascript Social plugin in an AngularJS App, but It does not updates the addthis plugin icons when I load a partial with ng-view. If I refres
If you are using the new AddThis dashboard configuration then you can just wrap addthis.layers.refresh()
(see: http://www.addthis.com/academy/using-dashboard-configuration-tools-dynamically/) in a directive and add to your div.
.directive('addthisToolbox', function() {
return {
restrict: 'A',
transclude: true,
replace: true,
template: '',
link: function ($scope, element, attrs) {
// Checks if addthis is loaded yet (initial page load)
if (addthis.layers.refresh) {
addthis.layers.refresh();
}
}
};
});
HTML: