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 trialDeanna O'Neal
7,278 PointsCreate a new service called 'myService'.
Here's my solution that didn't pass:
angular.module('foobar', []);
.service('myService', function(){
});
3 Answers
Nicolas Hampton
44,638 PointsDeanna,
put that semicolon back, then remove the semi-colon on the first line. That's the one that ends the line, preventing service from chaining to the end of module.
Nicolas
Clyde Westmoreland
3,685 Pointsangular.module('foobar', [])
.service('myService', function() { });
Nicolas Hampton
44,638 PointsDeanna,
In order to chain the service method onto the module, you have to remove the semi-colon. Then your code should work fine. Happy coding!
Nicolas
Deanna O'Neal
7,278 PointsI got this message again after removing the semicolon: Bummer! There was an error with your code: SyntaxError: Parse error
angular.module('foobar', []);
.service('myService', function(){
})
Deanna O'Neal
7,278 PointsDeanna O'Neal
7,278 PointsWow. Feeling a little less than brilliant right now. Thank you so very deeply much!