Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Issue: ngForm validation inside a table #9857

Closed
uqee opened this issue Oct 31, 2014 · 7 comments
Closed

Issue: ngForm validation inside a table #9857

uqee opened this issue Oct 31, 2014 · 7 comments

Comments

@uqee
Copy link

uqee commented Oct 31, 2014

Hi, guys, I've created a fiddle to show what I mean, please have a look: http://jsfiddle.net/wisard/0csmenje/1/

@Narretz
Copy link
Contributor

Narretz commented Oct 31, 2014

Hi @uqee, please note that you should ask support questions on other channels, such as the mailing list (Google groups), the IRC or Stackoverflow. The angular repo is only for bugs and features.

That said, the issue with your example is that the html spec / parser does not allow tags other than td inside tr. You can see in the DOM that your ng-form is actually placed outside the table. You must set ng-form as an attribute on the tr

@uqee
Copy link
Author

uqee commented Oct 31, 2014

Great thanks, @Narretz. Will be more attentive hence.

@abobwhite
Copy link

Just so you know, I am seeing issues with this in Angular 1.3.15. When used as an attribute of <tr>, ng-form cannot find my parent form controller.

@gkalpak
Copy link
Member

gkalpak commented Jun 4, 2015

@abobwhite, do you have a demo that shows the issue ?

@abobwhite
Copy link

I will do that soon. Is there a stubbed jsbin or jsfiddle I can use as a template to start from?

I confirmed that this issue is not related to tables as I converted it just div tags and it still gave me the same error when using ng-form="" as an attribute. If I use as an element (<ng-form name="">), it works fine.

@abobwhite
Copy link

I have now confirmed that this is related to ng-repeat and ng-form being used on the same element. I don't think my issue is relevant to this issue but it's still an issue. I will search elsewhere - thanks.

@abobwhite
Copy link

@gkalpak Looks like you're actively involved on this issue #10165 which seems to open on my issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants