I am currently working on dynamically generating inputs using Angular and Angular Material. Each time the user clicks on the Add button, a new dropdown should be created. However, I am encountering an error message that says:
'Error: [$parse:syntax] Syntax Error: Token '{' invalid key at column 2 of the expression [{{choiceTest.Name}}] starting at [{choiceTest.Name}}].'
What changes do I need to make in my code to resolve this issue?
<div ng-repeat="choiceTest in $ctrl.inputsFilterRowsTest">
<md-input-container flex="30">
<label>Filter Type</label>
<md-select ng-model={{choiceTest.Name}} name="">
<md-option ng-repeat="filter in $ctrl.filters" value="{{filter.value}}">
{{filter.value}}
</md-option>
</md-select>
</md-input-container>
</div>
<md-button class="md-raised" ng-click="$ctrl.addFilterTest()">ADD</md-button>
Controller
self.inputsFilterRowsTest = [];
self.filters = [
{ value: 'Filter1' },
{ value: 'Filter2' },
{ value: 'Filter3' }
];
self.addFilterTest = function () {
var newItemTestNo = self.inputsFilterRowsTest.length + 1;
self.inputsFilterRowsTest.push({ 'value': 'inputFilter' + newItemTestNo, 'name': 'inputFilter' + newItemTestNo });
};