Skip to content

Instantly share code, notes, and snippets.

@dmackerman dmackerman/directive.js Secret
Last active Aug 29, 2015

Embed
What would you like to do?
(function() {
var app = angular.module('apptui');
app.directive('mousePad', function($ionicGesture) {
return {
restrict: 'E',
replace: true,
template: '<div class="mouse-pad"></div>',
link: function(scope, element, attributes) {
$ionicGesture.on('drag', onDrag, element);
function onDrag() {
// do stuff
}
}
};
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.