Im trying to set up a search, orderBy, and limit to the list of events in Angular ngRepeat:
self.guides = [
{name: 'name',
events: {
event: 'event',
event1: 'event1'
}},
{name: 'name1',
events: {
event: 'event',
event1: 'event1'
}},
];
and here is html:
<input ng-model="myCtrl.query" type="text" placeholder="Search">
<div ng-repeat="(event, value) in myCtrl.guides track by $index | filter: myCtrl.query | orderBy: 'name' | limitTo: 1">
<h1>{{value.name}}</h1>
<div ng-repeat='key in value.events'>
{{key.event}}
{{key.event1}}
</div>
</div>
and at the end non of this works, there is no errors in the console ignores everything typed in the input
Here
ng-repeat='key in value.events'
You are takingkey
as direct value, Try: