Skip to content

Instantly share code, notes, and snippets.

@mbuttler
Created August 8, 2015 13:48
Show Gist options
  • Save mbuttler/d3bb5105648872247a4c to your computer and use it in GitHub Desktop.
Save mbuttler/d3bb5105648872247a4c to your computer and use it in GitHub Desktop.
AngularJS - Feedster PlusOne.js
app.directive('plusOne', function() {
return {
restrict: 'E',
scope: {
},
templateUrl: 'js/directives/plusOne.html',
link: function(like() {
function(scope, element, attrs) {
scope.like = function() {
element.toggleClass('btn-like');
}
}
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment