Good day,

Please some one help me.
I'm learning angularjs and trying to make a POST request as follow

angular.module("nome").controller("controllerLogin",function($scope, $http){

    var $SERVICES_CONTEXT = "url/";

    $scope.title = "Tit";
    
    $scope.logar = function (){
      var data = ({Usuario: "midana",Senha:"senha"});
 var config = {
                headers : {
                    'Content-Type': 
'application/x-www-form-urlencoded;charset=utf-8;',
'data': {Device:"1"}
                }
            }
 
      $http.post($SERVICES_CONTEXT+"Acesso/Entrar", 
data,config).success(function(data){
        console.log(data);
      });
    };
});

and the error is as follow:
XMLHttpRequest cannot load <myURL>. No 'Access-Control-Allow-Origin' header 
is present on the requested resource. Origin 'null' is therefore not 
allowed access.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to