I have a very simple problem.
I have a form with a button passing it as an object to a controller. Everything is working totally fine but the current name (by which it is currently passed) cannot stay and needs to be dynamic as I have multiple tabs and the names cant be the same for multiple forms.
So the problem. Name now, working:
<form name="form" novalidate>
...
<button ... ng-click="Tab.validate.validate(form)">
Desired variant that does not work:
<form name="{{'form_' + tab.name}}" novalidate>
...
<button ... ng-click="Tab.validate({{'form_' + tab.name}})">
Form name in this case is properly 'form_tabName'. I use this expression syntax for id's and many other name elements to pre or suffix them in my code so its the ngclick side I'd like to change.
Error:
Error: [$parse:syntax] Syntax Error: Token '{' invalid key at column 37 of the expression [Tab.validate('form_' + {{tab.name}})] starting at [{tab.name}})].