michahell/pinbored-nwjs

View on GitHub
App/scripts/directives/stopevent.js

Summary

Maintainability
A
0 mins
Test Coverage

/**
 * @ngdoc directive
 * @name pinboredWebkitApp.stopEvent
 * @description
 * # stopEvent directive
 * Directive in the pinboredWebkitApp.
 */
angular.module('pinboredWebkitApp')

  .directive('stopEvent', function () {
    return {
      restrict: 'A',
      link: function (scope, element, attr) {
        element.bind('click', function (e) {
          e.stopPropagation();
        });
      }
    };
  });