jameskleeh / angular-confirm

Confirmation modal dialog for AngularJS
Apache License 2.0
150 stars 75 forks source link

things in template pass to the $confirm? #22

Closed feaswcy closed 8 years ago

feaswcy commented 8 years ago

I am in trouble with use templateUrl which includes angular validation(the original),and i want to pass Form.$valid to the confirm dialogo function ok but it didn't work in the controller with then(function(isValid){console.log(isValid)})....or is there any way to link submit action to this ok function ... much appreciations if you can deal with it cause i am a new one in angular js....

jameskleeh commented 8 years ago

So essentially the OK button should only work if the form is valid?

If so, you can probably get away with having that logic in your view. Another option is to provide a controller (use the existing one as a starting point) and do your logic there.