Angular_returns timespan as array

227 Views Asked by At

How to filter TimeSpan response with Angular.

This is what i get from server (JSON form of TimeSpan)

{"0":"\"","1":"0","2":"2","3":":","4":"0","5":"0","6":":","7":"0","8":"0","9":"\""}

The server call is

public TimeSpan GetCurrentWorkhourState(int employeeId, DateTimeOffset date)

Why does it send like json??

1

There are 1 best solutions below

0
On BEST ANSWER

The problem was that i was using $resource which works only with objects and arrays, and not with raw strings