I'm trying to generate dynamically ng-model
directive in ng-repeat
but I receive an error from browser. We get dynamically attributes of a type and I would like to set its in DOM.
I'm recieving this error:
Error: [$parse:syntax] Syntax Error: Token '{' invalid key at column 2 of the expression [{{'attribute.'+attribute.label}}] starting at [{'attribute.'+attribute.label}}].
Click here
<div class="form-group" ng-repeat="attribute in objectType.objectAttributes | orderBy : attribute.order">
<div class="col-sm-10" ng-if="attribute.multivalued==false">
<input type="{{attribute.type}}" class="form-control"
ng-model="{{'attribute.'+attribute.label}}">
</div>
</div>
Do you have any idea which can help me to solve this problem? Thank you!