Infdig in Angular when trying to calculate timestamp from date for $scope

120 Views Asked by At

I get a date value in my controller and I want to have the timestamp value in a $scope variable.

I do $scope.timestamp = new Date(workspace.date).getTime();

But I get error messages in console:

angular.js:63 Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!(…)

How can I avoid digest loop here?

0

There are 0 best solutions below