Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialGeorge Drakakis
6,369 PointsAngularJs Workshop Error
Hi there,
I am trying to make the workshop with dabbble and in 19:34 that you puth the 'callback=JSON_CALLBACK'
I get this this at the top of my html page
and of course it doesn't work and I don't get anything from console.log(data).
// Controller
var controllers = angular.module('dabbble.controllers',[]);
controllers.controller('AppCtrl',function($scope){
$scope.name = "Module";
});
controllers.controller('ShotsListCtrl',function($scope,$http){
$http.jsonp('http://api.dribble.com/shots/popular?callback=JSON_CALLBACK').then(function(data){
$scope.list = data.data;
console.log(data);
});
});
Any idea what is wrong?
p.s. Sorry for the formating but really this tab coding block is not user friendly :-)
George Drakakis
6,369 PointsThank you James! Lets hope I get an answer on my problem now :-)
1 Answer
Amit Bijlani
Treehouse Guest TeacherAre you running it off a web server locally?
George Drakakis
6,369 PointsI am running it in my localhost ( Apache). = http://localhost/angularjs
Amit Bijlani
Treehouse Guest TeacherI see the problem. There's a spelling error in dribbble.com. There are 3 b's and you have only 2.
George Drakakis
6,369 PointsThank you Amit most probably thats the problem. I'll try that :-)
James Barnett
39,199 PointsJames Barnett
39,199 PointsI fixed your code formatting using code fences.
You can learn about using code fences, in the how to type code in the forum thread.