0
<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.

3 Answers 3

1

You should use ng-value but not use the {{}} for evaluation.

Also - you don't need to provider "id" property when working with angular.

Sign up to request clarification or add additional context in comments.

Comments

0

Here the problem is with ng-value. By using value instead of ng-value it worked well.. Thanks for the efforts you guys made.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.