What to do in 9.1/11


#1

In the controller in the $scope.products array, add a new property named likes to each element. Set all likes properties to 0.
app.controller('MainController',['$scope',function($scope){
$scope.title='Are toppers really great guys?';
$scope.promo='Are they superior to non toppers?';
$scope.products=[{
name:'The Book of Trees',
price:19,
pubdate:new Date('2014','03','08'),
cover:'img/the-book-of-trees.jpg',
likes:0
},
{
name:'Program or be Programmed',
price:8,
pubdate:new Date('2013','08','01'),
cover:'img/program-or-be-programmed.jpg',
likes:0
},
{
name:'Harry Potter',
price:12,
pubdate:new Date('2005','08','01'),
likes:0
},
{
name:'Sherlock Holmes',
price:10,
pubdate:new Date('2014','08','01'),
likes:0
},
]
}]);


#2

The code worked after submitting again.Did not do anything


#3

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