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!

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

Ricard Taujenis
Ricard Taujenis
4,383 Points

not shure were to place customDirective

have checked the previous video from the course


1 Answer

Seth Kroger
Seth Kroger
56,409 Points

First, you misspelled module. Second, instead of placing a semi-colon after module() you should follow it with .directive() (ie., it need to be written as angular.module(...).directive(...)). This is called method chaining and is very common in Angular and other frameworks. Third, the directive needs an anonymous function as a second parameter.

   .directive('customDirective', function() {});