Skip to content

Instantly share code, notes, and snippets.

@stabenfeldt
Last active August 29, 2015 14:06
Show Gist options
  • Save stabenfeldt/52cc131768904085bf36 to your computer and use it in GitHub Desktop.
Save stabenfeldt/52cc131768904085bf36 to your computer and use it in GitHub Desktop.
angular.module('app', [])
.directive('starred', function() {
return {
restrict: 'E',
scope: {
objectClass: '='
},
templateUrl: '/templates/starred.html.slim',
controller: function($scope, $attrs) {
return $scope.star_clicked = function(e) {
var id = $(e.target).closest('tr').data('customer-id');
console.log("info: " + $attrs.objectClass);
console.log("id: " + id);
};
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment