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 trialBoyan Nakov
5,286 PointsWhy is Task No. 1 no longer passing if it has already said that I have completed it?
Hi,
I am writing the following code for task No. 1:
angular.module('foobar', [])
and the program accepts it and gives the next task. When I finish the second task, the editor says that Task No. 1 is no longer passing. Here is the code from Task No. 2 /second line added to the completed Task No.1/
angular.module('foobar', []) .directive('customDirective');
Where is the mistake, that I cannot see? Why it keeps saying that Task No. 1 is no longer passing when I haven;t changed the code that has been already accpeted as correct?
angular.module('foobar', [])
2 Answers
Seth Kroger
56,413 PointsThat message is usually caused by a syntax or other error that causes the code to stop, so neither task can run even though the code for the first task is correct. Here directive() requires it's 2nd argument of a callback function after the name. Just use an empty anonymous one.
angular.module('foobar', [])
.directive('customDirective', function() {});
Boyan Nakov
5,286 PointsThank you!