0
I have a controller:
function ItemsCrtl($scope) {
$scope.items = [
{id: 0, name: "PC"},
{id: 2, name: "GEladeira"},
{id: 3, name: "Fogao"},
{id: 4, name: "cama"},
{id: 5, name: "privada"},
{id: 6, name: "sofá"}
]
}
And in my html:
<div ng-controller="ItemsCrtl">
<input type="text" ng-model="items.name">
<ul>
<li ng-repeat="item in items">
{{item.id}} - {{item.name}}
</li>
</ul>
</div>
But ng-model does not work, it does not filter the list by the item name. How to do in this case when it is a list of objects.
And the controller?
– LeAndrade
Not much has changed, but there’s the controller
– Felipe Coelho