Angular Track and Order By

Start using Angular and play with a demo. In the model, an event element includes a start time called start_at and a header.

I had a tag using ng-repeat = "event in the event track at index $ index" and tried to add to "| orderBy: event.starts_at". This had no effect on sorting until I deleted the track section.

Does any sorting option track in Angular?

+6
source share
1 answer

According to the docs https://docs.angularjs.org/api/ng/directive/ngRepeat filter expressions (and I suspect ordering) expressions come before .

Example:

item in items | filter:searchText track by item.id 
+13
source

Source: https://habr.com/ru/post/980461/


All Articles