Sha256: 61f8876eee1206e78c14cf8470884b9d15d9ea5cf1950b34500eeaa8639c1357
Contents?: true
Size: 573 Bytes
Versions: 10
Compression:
Stored size: 573 Bytes
Contents
/** * A generic confirmation for risky actions. * Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function */ angular.module('ngReallyClick',[]).directive('ngReallyClick', [function() { return { restrict: 'A', link: function(scope, element, attrs) { element.bind('click', function() { var message = attrs.ngReallyMessage; if (message && confirm(message)) { scope.$apply(attrs.ngReallyClick); } }); } } }]);
Version data entries
10 entries across 10 versions & 1 rubygems