likeastore / ngDialog

Modals and popups provider for Angular.js applications
http://likeastore.github.io/ngDialog
3.14k stars 692 forks source link

onOpenCallback not set during setDefaults #559

Open unluckynelson opened 7 years ago

unluckynelson commented 7 years ago

What version of ng-dialog are you using? v1.20 What version of AngularJS are you using? v1.4.9 What browsers are affected? Any Please provide either a JSFiddle, Plunkr example that replicates the issue

ngDialogProvider.setDefaults({
        onOpenCallback: function() {
            // This never runs
            console.log("Firing open dialog: "+preventNavigation);
            preventNavigation = true;
        },
        preCloseCallback: function() {
            console.log("Firing close dialog: "+preventNavigation);
            preventNavigation = false;
        }
    });

Please describe the issue onOpenCallback is not set by the ngDialogProvider

What did you expect to happen?

The console log: Firing open dialog

What actually happened?

Nothing

lukenofurther commented 7 years ago

+1