-
Notifications
You must be signed in to change notification settings - Fork 6.7k
form inside modal #1022
Comments
Try using |
this.form does work, however, is that how it should work or is it a real bug? |
@caitp this.form does work, however $scope.form is the angularjs way. Perhaps the best solution would be to have the resolv parameter to the modal be a function that creates the scope used in the modalInstance. Also I should add that in my production code, I had something that did something along the following lines: angular.forEach(['firstname', 'lastname', 'email', 'password'], function (val) {
$scope.$watch(val, function() {
$scope.signupForm[val].$setValidity('server', true);
});
}); When using ui-bootstrap (bs3 branch) and bootstrap 3.0, the code fails because of bug exhibited by plnkr. Replacing "$scope" with "this" will not work in common scenarios like this (where this means something else). This is why I believe this is a bug that needs fixing. |
This is a bug, but I am closing it seems it seems that its a duplicate of Issue #969 |
In the above scenario you mentioned, you are allowed to bind the callback to your controller -- you also should be able to get around this with the the 'controller as' model, if (and only if!) it's not unreasonable for that particular controller |
Forms inside modals seem to be broken. I believe this is a scope/transclude issue.
Here is a minimal plunker (unable to submit form inside modal):
http://embed.plnkr.co/CGDZcFovIEJJrAsq1Sa6/
The text was updated successfully, but these errors were encountered: