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) Using Angular's Built In Directives Using ng-blur and ng-class to Improve User Experience

Ilia Loginov
Ilia Loginov
13,015 Points

ng-blur directive doesn't work

I'm using chrome 59.0.3071.115. I tried to preview the code from workspaces and from my local machine. The result is the same. When I click outside of the input area nothing happens.

make sure you didn't apply it to the checkbox input by mistake ..it should be on the text input I made this mistake and was confused for a few minutes!

1 Answer

It's not that it doesn't work. The blur event seems to only fire when you change the actual text of the "to-do." If you don't make any changes, it doesn't fire.