sarath2/ngEkathuwa — pull request #3 by Kraftwurm (2013-09-10 14:39:53+00:00)
Title: directly return a proper promise

Hi there

Thanks for your effort!

The way you do it with the promise and then manually showing the modal does not work with the latest Angular.js 1.2.0.rc2 !

I suggest, that you directly return a proper promise a the result to the modal call.

this way you can do something like:

var promise = $ekathuwa.modal({
id: "myModal",
show: false,
scope: $scope,
templateURL: '/Admin/Test'
});

promise.then(function (x) {
x.modal('show');
x.on('hidden.bs.modal', function (e) {
alert("hey. i'm closing shop!");
});
});

Again, thanks for making this component in the first place! It works great for me.

Best Regards,
Jimmy