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 Lists

"We can't find any <li> elements" error

I'm getting "We can't find any <li> elements" error when checking work. But it's have.

What's the problem with that?

index.html
<!DOCTYPE html>
<html ng-app="myApp">
<head>
  <title>Angular.js</title>
  <script src="js/angular.js"></script>
  <script src="app.js"></script>
</head>
<body ng-controller="myController">

<ul>
  <li ng-repeat="fruit in bowlOfFruits">
    {{fruit.name}}
  </li>
</ul>

</body>
</html>
app.js
angular.module('myApp', [])
.controller('myController', function ($scope, $http) {
  $scope.bowlOfFruit = [
    {name: 'Apple'},
    {name: 'Pear'},
    {name: 'Orange'}
  ];
});

2 Answers

Looks like here it is:

$scope.bowlOfFruit // and 
ng-repeat="fruit in bowlOfFruits"

bowlOfFruit vs. bowlOfFruits

Opps. I totally missed that. Thank you so much.