Skip to content

Instantly share code, notes, and snippets.

Avatar

Víctor Collado vcollado

View GitHub Profile
@vcollado
vcollado / ng-really.js
Last active Nov 22, 2017 — forked from mwagena/ng-really.js
Updated using es6 and angularUI
View ng-really.js
/**
* 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;