-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Form never shows up in $scope variable when created using ng-repeat #3216
Comments
Can you provide a running code example on Plunker or the like? On 12 July 2013 21:31, Siraris [email protected] wrote:
|
http://plnkr.co/edit/6mA7Qakj0BkKv2s4CWKZ?p=preview If you look at the console in this example after pressing submit, you will see that there is no property for either form on $scope. To my knowledge, I have no way of accessing the form from the controller unless it's stored on the $scope. |
Mind if I ask for some use cases for wanting to access these dynamically rendered forms from $scope? |
I want to be able to call setPristine() on the form after any dirty fields have been submitted. Or what if I want to do some validation on the forms? |
Your problem is that you are not allowed to have dynamically interpolated On 13 July 2013 00:18, Siraris [email protected] wrote:
|
This is also duplicate of #1404 |
I am using ng-repeat to create a variable number of forms to manage some records from our database. Everything works fine, except $scope never picks up the forms, and thus, I never have access to the forms themselves in Angular. If I explicitly define multiple forms outside of the ng-repeat directive, Angular picks them up fine and they appear inside of $scope.
I'm pretty sure this is a bug, but if not, I'd appreciate any insight on how to get my forms to show up in the $scope chain.
Thanks!
The text was updated successfully, but these errors were encountered: