jeevsmyd -2 Junior Poster

I'm getting the following error
Syntax Error: Token '{' is an unexpected token at column 6 of the expression [rForm{{] starting at [{4}].

My form code is as follows

<form name ="rForm{{$index}}" ng-submit="rForm{{$index}}.$valid && rCtrl.saveResource(api)" style="margin-top:0%" class="form-horizontal" role="form">

I'm using {{$index}} since I'm making multiple forms dynamically. The final html rendered is exactly as I want as below

<form name="rForm0" ng-submit="rForm0.$valid &amp;&amp; rCtrl.saveResource(api)" style="margin-top:0%" class="form-horizontal ng-pristine ng-invalid ng-invalid-required" role="form">

But angular is going crazy at my template {{$index}}.$valid and not showing the expected behavior. Please help me solve this!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.