johnpapa/HotTowel-Angular

Issue while calling REST api.

Opened this issue · 0 comments

I have a simple code which is calling RESTful Api to retrieve data from server.

$http.get('http://localhost:53384/api/contact').
          success(function (data, status, headers, config) {
              log(data[0].Id);
              log(data[0].Name);
          }).
          error(function (data, status, headers, config) {
              log('Error Occured');
          });

Same code is working fine in Internet Explorer but in Mozilla and chrome its executing .error promise.
Would you please resolve this?