Skip to content

Instantly share code, notes, and snippets.

What would you like to do? Social Sharing Widget AngularJS integration
<!doctype html>
<html lang="en" data-framework="angularjs">
<meta charset="utf-8">
<title>AngularJS widget integration</title>
window.pwidget_config = {}; // post widget config (optional)
<!-- Important: init should be lazy -->
<script src=""></script>
<!-- Your Angular App. For example -->
<li ng-repeat="todo in todos">
<div data-post-widget class="pw-widget" data-size="medium" data-url="{{todo.url}}">
<a class="pw-button-livejournal"></a>
<a class="pw-button-twitter"></a>
<a class="pw-button-linkedin"></a>
todomvc // todomvc — your angular app namespace
.directive('postWidget', ['$timeout', function ($timeout) {
return {
restrict : 'EAC',
link: function ($scope, element, attributes) {
$timeout(function () {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment