Rails Backend with Heroku trouble

I have slowly been making headway with my ionic application. Recently though I had a backend built out using Rails via Heroku and trying to send and recieve data is new territory for me.

So far from the research i have done, it seems using $http won’t work. I have seen it’s recommended to use ngResource with rails, which I have tried, but I don’t seem to be getting anywhere. Can someone give me a basic rundown of how to do this please. Any help would be very much appreciated!

I also keep getting XMLHttpRequest No ‘Access-Control-Allow-Origin’ header is present despite the back end developer telling me that it should work.

Here is my code so far

angular.module('va_disability.login', [] )

.controller('LoginCtrl',['$scope', '$state', 'login', function LoginCtrl($scope, $state, login){

    login.query({password: "hello", username: "thomas"});
    $scope.goToMain = function(){

angular.module('va_disability.server', ['ngResource'])

.factory('login', ['$resource',
        return $resource('https://fmserver.herokuapp.com/users/sign_in');

I am currently testing the application via chrome using ripple.

Unfortunately the onyl way I know how to debug this is to see the heroku logs.

You could have your backend guy do this:

which will whitelist EVERYTHING