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 Review: get, delete, and save data with services

Sean Flanagan
Sean Flanagan
33,235 Points

The $http.get method can take a callback as a parameter.

The correct answer to this question is apparently False. But according to the video "Using Services to Get Data", in Huston Hedinger's words:

"The first parameter in then is going to be the callback function that's executed when a successful response is received."

So how does this work, exactly?

2 Answers

Steven Parker
Steven Parker
231,275 Points

The forum is a great place to get help from other students, but may not be the most expedient (or even certain) way to contact the staff.

You might also want to make a bug report directly to the staff as described on the Support page.

Sean Flanagan
Sean Flanagan
33,235 Points

Hi Steven. Thanks for trying to help.

I never said there was a bug. When I said, "How does it work?", I meant why is the statement false? I'm looking at the Angular documentation now (I should have done that in the first instance). Is the answer false because the get method takes a URL as a parameter with config as an array, like below?

get(url, [config]);

Cheers

Sean

Steven Parker
Steven Parker
231,275 Points

I thought you were pointing out that the quiz was scoring incorrectly.