It is essential that a filter returns the same result for the same input
every time. Since you said it returns "1 second ago" it seems like you may
have a filter that depends on real time (for example if it does new
Date()). If that's the case you should probably change your code to:
$interval(function() { var now = new Date(); .... }, 1000);
and use now for all time calculations. Of course I'm only guessing since
you don't give a lot of information. An actual code example in jsfiddle.net
or similar would make it much easier.
thanks, Lars
On Saturday, April 12, 2014 9:49:17 AM UTC+2, Steve Wagner wrote:
>
> Hi Elias,
>
> its one screen page with around 100 different datapoints. The interesting
> point is that the filter is only used for displaying the age of the last
> incoming event at the page top, nothing more, only one place. I dont tried
> other update times yet because one second works very well from viewers
> perspective. At the most time the filter outputs the value "1 second ago".
> And the error seems only to happen if the value is higher then 1 second.
>
> I currently do the 1000ms update via:
>
> $interval(function() { /*automatically calls apply*/ }, 1000);
>
> -Steve
>
>
> On Wed, Apr 9, 2014 at 4:39 PM, Sander Elias <[email protected]<javascript:>
> > wrote:
>
>> Hi Steve,
>>
>> How many data points are we talking about? The filter makes sure every
>> one of those is updated every digest loop. 1 second might be just a little
>> too short. I think sugarJs might eat up more time than you anticipate! did
>> you try with for example 1500ms?
>>
>> Regards
>> Sander
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "AngularJS" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/angular/Mtjt_dIughs/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.