Angular resource not working out, have to switch to http.