Sometimes I have trouble to fetch my data using $http service. And I did not 100% understand the main difference between .success() and .then()
The following is an examp
Success returns data already, in your case it returns cats, so effectively you're assigning property data on cats. On the other hand, in the second example the data are part of the response, so cats are in response.data.
To understand the difference between $http().then() and $http().success(), I'd recommend this great article: http://chariotsolutions.com/blog/post/angularjs-corner-using-promises-q-handle-asynchronous-calls/