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 trial

JavaScript AngularJS Basics (1.x) Services in Angular Using Services To Get Data

What happened to my todos?

I'm using the Brackets text editor.

Since I'm not working in Treehouse Workspace how do I get the preview of the mock/todos.json folder and file where Huston is typing it in on the url at the 1:06 mark?

Here's my todos.json file

[ {"name": "clean the house"}, {"name": "water the dog"}, {"name": "feed the lawn"}, {"name": "pay the bills"}, {"name": "run"}, {"name": "swim"} ]

and here's my app.js file

angular.module("todoListApp", []) .controller("mainCtrl", function($scope, dataService){

$scope.learningNgChange = function() {
    console.log("An input changed!");
};

$scope.helloConsole = dataService.helloConsole;

})

.service("dataService", function() { this.helloConsole = function() {
console.log("This is the hello console service!"); };

});

1 Answer

Hey Martin.

I'm not sure what you're asking. Do you want to be able to see the file itself or are the mock todos.json tasks not loading correctly in your app?