'Add Two More Object' on Exercise 4/8

angularjs

#1

Hi guys,

Need help with exercise 4/8, I don't understand with the instruction.
'Add Two More Object'
Is it like this?
$scope.apps = [
{
icon: 'img/move.jpg',
title: 'MOVE',
developer: 'MOVE, Inc.',
price: 0.99,
favorite:...
},
{
icon: 'img/shutterbugg.jpg',
title: 'Shutterbugg',
developer: 'Chico Dusty',
price: 2.99,
favorite:....
}
]

Thank you for your help


#2

No need guys, already got the answer and passed. thanks


#3

Hi guys! how did you do it, please ??


#4

app.controller('MainController', ['$scope', function($scope) {
$scope.apps = [
{
icon: 'img/move.jpg',
title: 'MOVE',
developer: 'MOVE, Inc.',
price: 0.99
},
{
icon: 'img/shutterbugg.jpg',
title: 'Shutterbugg',
developer: 'Chico Dusty',
price: 2.99
},
{
icon: 'img/gameboard.jpg',
title: 'Gameboard',
developer: 'Armando P.',
price: 1.99
},
{
icon: 'img/forecast.jpg',
title: 'Forecast',
developer: 'Forecast',
price: 1.99
}
];

}]);


#5

What does it mean by:

In the view, use ng-repeat to loop through $scope.apps and display each element. To do this, add ng-repeat to a

, and then use the custom directive to display each element.