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 trialLeor Benari
628 PointsNot Getting Any Output in Preview
I believe that I followed along with what Huston was doing, but I'm not getting any output when I preview this. I have included a snapshot of my workspace below:
Thanks!
2 Answers
Steven Parker
231,275 PointsWithout forking your snapshot, I spotted a couple of potential issues right off:
- your HTML tries to include a script file "hello-world.js", but there is no such file in your snapshot
- there is a stray equal-sign (=) in the type attribute of that same script line
Ryan Mayo
23,604 PointsNailed it. I had the same problem for a bit and was hitting my head against the wall. Watch the bit where he talks about scope again. You'll hear him mention that the scope of the mainCtrl controller is limited to the div that it is applied to. This means that for your helloWorld() function to work IT MUST BE BETWEEN THE TAGS that you applied ng-controller="mainCtrl" to. Or simply: in your index file, cut the content on lines 18-24, add a line between 15-16 and plop it there.
Leor Benari
628 PointsLeor Benari
628 PointsThank you, I am relatively new to this - Hopefully, I'll be able to catch the next one on my own!