Reputation: 561
I would like this custom service(I know its not the best code) to return this JSON data but nothing is returning no matter what I try. Anyone know what I am doing wrong? I am sure it is something simple that I missed. Here is my code
Upvotes: 0
Views: 84
Reputation: 13399
It should be in the HTML (just AwesomeCars, not AwesomeCars.carData)
<ul class="list-group" ng-repeat="car in AwesomeCars">
and you need to inject 'carData' in the controller
chadTerm.controller('chad-midterm-controller', ['$scope', 'carData',
function($scope, carData) {
$scope.AwesomeCars = carData.cars;
}]);
Upvotes: 3