Problem with ngResource


#1

Hello,

I’m trying to create new services with $resource instead of with $http. The problem is that when I insert the following script tag in my index.html:

    <script src="lib/ionic/js/angular/angular-resource.min.js"></script>

I get the following error in my browser console:

GET http://localhost:8100/lib/ionic/js/angular/angular-resource.min.js.map 404 (Not Found) 

As you can see, the browser try to get angular-resource.min.js.map

Why the browser is trying to get the .map file? How can I integrate ionicframework with ngResource? I would prefer to work with $resource instead of $http.

Thank you in advance!


#2

The js will work even if the map is not present.
Also, the map for js’s is only a computer feature, won’t affect in anything to your app.
You can even disable the map feature on the browser by disabling it in the console options under sources


#3

Hello Bonda, thank you for reply.

I have found the solution. The problem was that I was inserting in index.html the minified version of angular-resource. If I insert the non-minified version it works fine. Here is where I found the solution: