1

I'm can't seem to figure out why my nested ngForms aren't working. I'll start with a basic overview.

I have one form tag inside of a Foundation reveal div. When I click a button the reveal is opened. After some checking I found that Foundation uses jQuery's detach method to remove the div from the DOM and append it to the right before the body tag. I've read a few places that this might mess with the listeners attached to the form. If I have the form on the page outside of the reveal div then everything works fine. Once I place it into the reveal div and the detach method is called, for some reason the elements in ngform no longer affect the validity of the ngForm they are in. The interesting part is elements nested within the overall form tag still work fine. See the following JSBin for an example. I think this is has something do to with the scope being destroyed as per this stackoverflow. Any and all help is appreciated. Thanks.

JSBin example

Community
  • 1
  • 1
selanac82
  • 2,920
  • 4
  • 27
  • 37

0 Answers0