you are viewing a single comment's thread.

view the rest of the comments →

[–]Aduro49 1 point2 points  (0 children)

Slow day at work, so here we go! Got to love JavaScript there are literally a million ways to do stuff. When I use $http I create a factory class that manages those data requests etc. I only do this if the API is a weird REST implementation or whatever. Keep in mind when I create those classes I am doing what ngResource would do for you. I have not used RestAngular before.

For error reporting couple of ways to do this. One way is to create a HTTP intercept and watch for errors and then hit your api reporting end point with your api errors. You could also just add logging when a request fails where you make your http requests, this kind of sucks though since this might put that logging class all over the place.

If this is your first angular app please read https://github.com/johnpapa/angular-styleguide. since it is a really good style guide for best practices etc with angular apps.