Skip to content

Instantly share code, notes, and snippets.

View vcollado's full-sized avatar

Víctor Collado vcollado

View GitHub Profile
@vcollado
vcollado / ng-really.js
Last active November 22, 2017 16:35 — forked from mwagena/ng-really.js
Updated using es6 and angularUI
/**
* A generic confirmation for risky actions.
* Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" ng-really-title="Delete this?" function
*/
export default function ngReallyClick($uibModal, $timeout) {
return {
restrict: 'A',
link: function (scope, element, attrs) {
return element.bind('click', function () {
var message, title;