Inside a controller:
$scope.bar = {'label': 'user_label', 'bindTo': 'user.name'};
Next, in the HTML:
<label for="user_label">User Label</label>
<input name="{{bar.label}}" type="text" class="form-control" ng-model="{{bar.bindTo}}"/>
An error is thrown:
Syntax Error: Token 'bar.bindTo' is unexpected, expecting [:] at column 3 of the expression [{{bar.bindTo}}] starting at [bar.bindTo}}]
Is there another way to make this work?