I had tred this way

factory('myService', function ($http) {
         var listRdusers;
         return {
             getFoo: function () {
                 return $http.get('/api/UserAPI?userListType=rdUsers');
                });
             }
         }
     })

     myService.getFoo().then(function (data) {
            console.log(data);
            $scope.taskusers = data;
        })
or

 myService.getFoo().success(function (response) {
            console.log(response);
            $scope.users = response;
        }).error(function (err) {
            alert('Error: ' + err);
        });

 but it failed. The $scope.taskusers can't bind the data, but the data is 
not empty (json format).
it return error message:

<https://lh4.googleusercontent.com/-6clx2WHGomg/VNiJKWrmrII/AAAAAAAAAXE/ebjMc1CPb5s/s1600/Noname1.jpg>

<https://lh4.googleusercontent.com/-4abrl940C-A/VNiKpgqdCPI/AAAAAAAAAXQ/IoGLPX1BPvA/s1600/Noname.jpg>




-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" 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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to