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?
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?
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
Rather than using Restangular for this instance, I would just use a simple $http.get() operation.