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 An Introduction to Two-Way Data Binding Looking at ng-model: Part 2

jQuery version compatibility and $element.hallo() is not a function

In the video I saw that jQuery 1.11.1 minified was being used. On the GitHub repository ChangeLog, it says that it was only compatible with jQuery 1.7. Now I tried jQuery 1.7 and it didn't work (otherwise I would have to debug hallo.js and it is not worth it). I had to go back to jQuery 1.6 (minified) for it to get to the next broken spot.

The next broken spot is on app.js where you call $element.hallo(). Here is the output from firebug in the current version of Firefox (updated the day of this question).

Error: $element.hallo is not a function .link@file:///path/to/app.js:36:1 Z@https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:70:149 A@https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:59:203 g@https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:51:299 A@https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:59:147 g@https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:51:299 ... etc

So, how on earth did you even get this to work?!

1 Answer

I know this comes late, but the Hallo.js readme on GitHub (https://github.com/bergie/hallo) says to use jQuery 1.10+. Have you tried this again?