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) Getting Started with Angular Review: Getting Started with Angular

Toni Dzalto
Toni Dzalto
21,667 Points

Challenge Task 2 of 3 Attach a custom directive called 'customDirective' to the module.

After task 1

angular.module('foobar', [])

I dont know how to pass task 2

i tried a lot of different ways including

angular.module('foobar', []) .customDirective();

but im not sure on this one, maybe sombody could explain.

2 Answers

Dustin McCaffree
Dustin McCaffree
14,310 Points

To pass Task 2:

angular.module('foobar', [])
.directive('customDirective', function() {

});

To pass Task 3, just follow the simple directions :)

Jake Lundberg
Jake Lundberg
13,965 Points

Check out the video, "Your first Angular Directive" around the 1:56 mark...it explains it there.