Exercise 7/11


#1



https://www.codecademy.com/courses/learn-angularjs/lessons/your-first-app/exercises/your-first-app-ng-repeat-ii?action=lesson_resume


in MainController.js we have declared an array named products, however in the view we are using product.name and so on rather than products.name. Even then it displays the correct output. When I changed the veiw code to products.name I did not get the correct expected output.
Please help me understand how exactly is it working even when we are not using the correct name.


#2

In the view if we are iterating over products one product at a time,

ng-repeat="product in products"

Do you have this in your code?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.