title: Error: $parse:syntax Syntax Error with ng-submit
body: <h2>Access dynamic form object in controller</h2>
  <p>Is there a way to access a form object in controller by just passing the name?</p>
  <p>I have dynamic forms inside my html which has name like <code>name=&quot;namedForm_{{$index}}&quot;</code>.</p>
  <p>Now I can pass the <code>$index</code> in <code>ng-submit</code> function call to generate form name in controller. So it will be <code>namedForm_1</code> or <code>namedForm_2</code>, etc. How to get the form object in controller to check the form validity there?</p>
  <p>Tried passing the validity as third argument here by checking condition. But the expression <code>namedForm_{{$index}}.$valid</code> is breaking.</p>
  <pre><code>&lt;form data-toggle=&quot;validator&quot; class=&quot;formClass&quot; form-submit-validation=&quot;&quot;
        name=&quot;namedForm_{{$index}}&quot; id=&quot;namedForm_{{$index}}&quot;
        ng-submit=&quot;namedForm_{{$index}}.$valid == true ? vm.submitNamedForm($index, widget, true) : vm.submitNamedForm($index, widget, false)&quot;
        autocomplete=&quot;off&quot; novalidate&gt;
  &lt;/form&gt;
  </code></pre>
  <p>Or any other solutions?</p>
  <p>Error from console:</p>
  <p><a href="https://i.stack.imgur.com/VlRGD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VlRGD.png" alt="error" /></a></p>