I understand 1.5 introduced new validation on orderBy because of an issue 
where orderBy was failing silently.

I have a piece of code that's more or less:

<div ng-repeat="task in tasks.getTasks() | orderBy: 
tasks.sort">{{task}}</div>

The orderby here works, but I get n errors in the console, where in 
represents tasks.getTasks().length.

Link to the errors: 
https://docs.angularjs.org/error/orderBy/notarray?p0=%7B%7D

The return value of tasks.getTasks() is an array, but it seems like 
whatever validation is being run against the expression runs before 
task.getTasks() runs.

It's important that I run the repeat off the function because the function 
accesses a service that is being manipulated by other parts of my 
application.

Is this a bug? And if not, what's the best way to achieve the same 
functionality without the errors?


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to