AngularJS 1.X - Issues with code


#1

The view in the right side shows that my code worked out, but I keep getting the error. Is it a bug?

EDIT: It seems that the code doesn't work when you create a new module and a new controller, although it's "suggested" in "Learn" (but not in Instructions). I don't know if it's possible to fix it or it's not necessary, but I could use the same model and controller given in the exercise, so it's a bit my fault, sorry. Anyway, I leave here a suggestion of improvement.


#2

Hello, to add more data to the controller, I just did the following and it is fine.

Go to MainController.js and do as in the instruction, like below.

app.controller('MainController', ['$scope', function($scope) { 
  $scope.title = 'This Month\'s Bestsellers'; 
  $scope.promo = 'The most popular books this month.';
  $scope.product = { 
  name: 'The Book of Trees', 
  price: 19 
	};
}]);

Although I added one semi-colon to avoid syntax error.

Hope this resolves.


#3

With the given module (myApp) and controller (MainController) it works fine; I supposed that the exercise doesn't understand what I did when I create a new module and controller (even if the viewer in the right side does).