down votefavorite 
<http://stackoverflow.com/questions/34479241/unable-to-access-json-using-http-get-status-is-coming-out-is-1?noredirect=1#>

I am very much new to angularjs and I am learning it by reading and 
implementing .In my code I am trying to access a json using $http.get but 
it is going to error and status is returning as -1 . Please help me .

RecordApp.factory('recordaccess', ['$http', function($http) {
$http.get('http://someurlforjson')
    .success(function(data) {
        return data;
    })
    .error(function(data, status, headers, config) {
        alert("Error occurred. Status: " + status);
    });}]);

Please guide me .

-- 
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to