0

I need to get a json file which is on my local machine, but my baseUrl in Restangular is not localhost...

So, here is the question: Is it possible to get local file with Restangular.service when a base url is not localhost ?

And how can I do that?

Costa
  • 1
  • 2

2 Answers2

0

See this post : Local file access with javascript

It is not a problem with Restangular but with Javascript.

If you need it for test purpose you can try to find a way to do it (see the post)

If you are doing this in production, it is a bad practice. You should not access local machine from front-end

Community
  • 1
  • 1
Weedoze
  • 12,968
  • 1
  • 34
  • 57
0

Rather than using Restangular for this instance, I would just use a simple $http.get() operation.

mindparse
  • 6,089
  • 21
  • 73
  • 167