0

I am using restangular to handle Rest API. Here is my call in javascript:

callApi: function(doubleOne, doubleTwo, doubleThree, doubleFour) {
        return Restangular.all('api/test/' + doubleOne+ '/' + doubleTwo+ '/' + doubleThree+ '/' + doubleFour).getList();
},

And this is the beginning of the api in the backend in c#:

[Route("api/test/{doubleOne}/{doubleTwo}/{doubleThree}/{doubleFour}")]
public IList<ViewModel> GetTest(double doubleOne, double doubleTwo, double doubleThree, double doubleFour)
   {
      ...
   }

If the doubles contain something like 56.9883432 or 56,9883432 I do not get in the backend code. If the doubles are "normal" numbers like 56 I get in the backend code.

Now I ask me if there is a limitation of using restangular. Is it really not possible to use restangular with floating-point numbers? Or did I miss something?

user3679607
  • 163
  • 2
  • 16

1 Answers1

0

The fault is not on restangular, it is because of web api. Please look at: Why is my Web API method with double args not getting called?

Community
  • 1
  • 1
user3679607
  • 163
  • 2
  • 16