Brian - Did you figure out how to handle this? I am also running into the 
same.

On Thursday, June 12, 2014 at 2:27:11 PM UTC-5, Brian Flynn wrote:
>
> I'm attempt to make a simple rest Web Service call. Pass in 
> Username/Password, get token back. Simple. 
>
> However, using Fiddler I'm able to see that the code I'm using seems to 
> execute the web service call just fine and the token is returned but when I 
> use Chrome's developer tools, I see that the call the service was cancelled 
> by something in Angular.js script. I've fought with this for an entire day 
> now with no success. Can anyone help me out? 
>
> Here's the code. 
>
> (function () {
>  
>     var app = angular.module("loginApp", ['ngResource'])
>         .config(function ($httpProvider)
>         {
>         // Enable CORS
>         $httpProvider.defaults.useXDomain = true;
>         delete $httpProvider.defaults.headers.common['X-Requested-With'];
>     });
>  
>     app.controller('LoginController', function ($scope, $http)
>     {
>         this.loginImage = "images/ActiveView_ContentMgm_140x40.png";
>  
>         this.loginUser = function ()
>         {
>             var token = ""; 
>             var loginUrl = 
> "http://ten1.com/services/rest/demoservice.svc/Login";;
>  
>             delete $http.defaults.headers.common['X-Requested-With'];
>             var result = $http({ method: 'GET', url: loginUrl, params: { 
> userName: this.userName, passWord: this.passWord } })            
>             .success(function (data, status) 
>               {
>                   $scope.status = status;
>                   $scope.data = data;
>             })
>             .error(function (data, status) 
>               {
>                   $scope.data = data || "Request failed";
>                   $scope.status = status;
>               });
>         };
>  
>     });
>  
>  
>  
> })(); 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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