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 trialBappy Golder
13,449 PointsCan't see my todos
I followed along as shown but it seems my todos are not showing. Any idea what's causing that?
Here's my latest code: https://w.trhou.se/ffshlpsfm6
Karen Rulander
20,520 PointsLIne 13 of your app.js needs to be deleted. The return statement was replaced with the '$scope.todos = reponse.data;
I'm not seeing the todos either. I'm not using Treehouse workspaces. (Could this be the issue?) I am getting the following error in the console: XMLHttpRequest cannot load file:/c:/........mock/todos.json Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
1 Answer
Gustavo Buarque
7,113 PointsI don't know if you are still having this problem. But if is not working in the workspace it is because in your code, there is a return before the code that you want to execute. dataService.getTodos(function(response){ console.log(response.data); return response.data $scope.todos = response.data; });
When your code get to return the next line will never run.
By the way I have the same problem as Karen has. I'm trying to figure out how to fix this outside a workspace. In my case doesn't show errors.
Jaro Schwab
8,957 PointsJaro Schwab
8,957 PointsDo you have an error Message? I can not see a syntax error or something like in your Code. Do you launch the application on a webserver?