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-click to change the application state.

toggle editing

Hi, so i tried by using the example given in the video with ng-click="editing != editing" for this part of the challenge and it did not work. I went on stackexchange and found ng-click = "toggle()", but have no idea what to put in there as the argument for the method and i tried ng-click = " (place the id you want in here ) != (place the id here) I don't get where i'm going wrong. please help

2 Answers

!= is an operator that checks if something is not equal. So therefore it won't affect the value of your variable. Since you want the value of the variable editing to be (=) not (!) the value of the variable editing, you should try ng-click="editing = !editing".

d'oh..thank you very much mrhummel