Answer the question
In order to leave comments, you need to log in
How to implement such form functionality in Angular?
There is an array:
items = [
{name: "Item1", category: "Cat1", price: 11},
{name: "Item2", category: "Cat1", price: 10},
{name: "Item3", category: "Cat2", price: 12},
];
<input type="text" ng-model="item.name">
<select ng-model="item.category" class="form-control">
<option ng-repeat="category in categoryList" value="{{category}}">{{category}}</option>
</select>
<input type="text" ng-model="item.price">
<button ng-click="addItem()">Add Item</button>
...
<input type="text" ng-model="item.name" uib-typeahead="item as item.name for item in items | filter:$viewValue">
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question