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 trialRicard Taujenis
4,383 Pointsnot shure were to place customDirective
have checked the previous video from the course
angular.moduel("foobar",[]);
directive('customDirective'()
1 Answer
Seth Kroger
56,413 PointsFirst, 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.
angular.module("foobar",[])
.directive('customDirective', function() {});