6/11 - 2 In $scope.products, did you add the "Program or be Programmed" object?


#1

I add products in AngularJs, but it show error:

In $scope.products, did you add the "Program or be Programmed" object?

In Maincontroller

app.controller('MainController', ['$scope', function($scope){$scope.title = 'AngularJs', $scope.promo = "Hello", $scope.products = [{ name: 'The Book of Trees', price: 19, pubdate: new Date('2014', '03', '08'), cover: 'img/the-book-of-trees.jpg'},{ name: "Program or be Programmed", price: 19, pubdate: new Date('2014', '03', '08'), cover: 'img/the-book-of-trees.jpg'}]}])


#2

Maybe $scope.title = 'AngularJs', $scope.promo = "Hello", Not comma, replace ;

$scope.title = 'AngularJs';
$scope.promo = "Hello";
~~~~


#3

$scope.products = [{
name: 'The Book of Trees',
price: 19,
pubdate: new Date('2014', '03', '08'),
cover: 'img/the-book-of-trees.jpg'
},
{
name: 'Program or be Programmed',
price: 8,
pubdate: new Date('2013', '08', '01'),
cover: 'img/program-or-be-programmed.jpg'
}]
}]);