Code doesn't function, but lesson gives be a check-mark?


#1

I'm on lesson 4: Built in and Custom Directives, and task 3. The instructions are:

"In the view, use ng-repeat to loop through $scope.apps and display each element. To do this, add ng-repeat to a <div class="card">, and then use the custom directive <app-info> to display each element."

So now my code is:

    <div class="main" ng-controller="MainController">
      <div class="container">
         <div class="card" ng-repeat="app in apps">
           <app-info info="{{ app.info }}"></app-info>
         </div>
      </div>
    </div>

The lesson gave me a check-mark and let me pass, and there were no errors, but my code will only display:


#2

The mistake is pretty simple.. I made it too.. see how you set the Info attribute in app-info to an expression? Well, you don't need an expression here... nor do you need to add ".info" .. just replace this line:
<app-info info="{{ app.info }}"></app-info>
with
<app-info info="app"></app-info>


#3

Aaah... That makes sense. And it worked! Thanks!