5. Filters II - Syntax error or typo?

Hi, For some reason I may have a syntax error or typo but I can’t see it. I already spent one hour trying to fix this, can anyone help pleeease… Here’s my code:

app.controller('MainController', ['$scope', function($scope) { 
  $scope.title = 'Peter is learning AngularJS';
  $scope.promo = 'The course is free!';
  $scope.product = {
    name: 'The Book of Trees', 
    price: 19,
    pubdate: new Date('2014', '03', '08')
  };
}]);

@peterjb73,
Can you provide us with the HTML code of your index.html-file you are using…

Thank you for your offer of help.

The codecadamy team said there was a system error in this instance.

I’m having trouble with this too im 12, just trying to learn how to make my own apps and I don’t know whats wrong with my code please help!
app.controller(‘MainController’, [’$scope’, function($scope) {
$scope.title = ‘This Month’s Bestsellers’;
$scope.promo = ‘The most popular books this month.’;
}]);

{
name: ‘The Book of Trees’,
price: 19
}

Your code should look like the following:

app.controller(‘MainController’, [’$scope’, function($scope) {
$scope.title = ‘Peter is learning AngularJS’;
$scope.promo = ‘The course is free!’;
$scope.product = {
name: ‘The Book of Trees’,
price: 19
};
}]);

1 Like