Reputation: 201
<div ng-repeat="type in (prepopulatingFieldData|prepopulateValue:'480edd03-cf94-e411-bd87-00155d005107')" >
<input id="applicationType" name="applicationType" ng-model="formData.applicationType" type="radio" ng-value="{{type.Name}}">
</input>
I want to set a value when the page load inside my angular controller. But the problem is when I set value inside it gives an exceptionlike this
Syntax Error: Token 'Member' is an unexpected token at column 9 of the expression [Student Member] starting at [Member].
My radio button values are
Student Member, Limited Member, Member can any one help me.
Upvotes: 0
Views: 432
Reputation: 2620
You should use ng-value but not use the {{}} for evaluation.
Also - you don't need to provider "id" property when working with angular.
Upvotes: 1
Reputation: 136
You can't use brackets within the ng-value directive, it will throw the error you get. Try it without the brackets and it should work.
Upvotes: 0
Reputation: 201
Here the problem is with ng-value. By using value instead of ng-value it worked well.. Thanks for the efforts you guys made.
Upvotes: 0