Hi I am creating a form dynamically on my angular app and the data format 
from service is like this

data=[{"type":textbox,"name":"username","fieldtype":{"readonly":true,"value":"tom"}},{"type":select,"name":"country","fieldtype":{"readonly":false,"value":['india','us']}}];

$scope.myform="form";
on front end i am binding like this

<form name={{myform}}>
<div ng-repeat="x in data">
<input type="textbox" ng-show="x.type==''textbox" 
ng-model="info.{{x.name}}">
<div>
</form>


here info is an object that angular will create for me so in last when user 
done with the changes i will send this info object to the server.

if user enter jack in textbox then info object will be

info={ "username":'jack'}


how to dynamically bind ng-model....


Or is there any better approach to achieve this requirement thanks..


And Actually i needed two dynamic expression to evaluate because i am using 
nested ng-repeat like this

ng-model="custobj.{{metadata.id}}.{{attributes.value}}"

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to