I need help with the js/controller/MainController


need help with it, trying to type it exactly but can't seem to get it...


Hi @cherrelly52

If you could please copy and paste what code you have at the moment and a description of the error you are getting someone will try to help as soon as they can. :smile:

Just a couple of pointers on this, you can always copy and paste the code example supplied in the unit to make your controller so you reduce your chance of errors, and if things start to weird on you don't forget to take advantage of the restart exercise feature, accessible from the bottom right hand corner menu "Get Help".


ok thankyou, I am trying to figure out how to copy the examples


@cherrelly52, hopefully I not misunderstanding your post here: The code in the black div sections is actually writing not an image, so just use regular copy and paste method for whatever your device is, assuming it supports it.
EG: On a windows based OS system, you would place the cursor near the text you want to copy, hold down the left mouse button and drag to highlight the text, once it is selected you would right click and choose copy, or you would use the keyboard shortcut CTRL + C for copy, Then move your cursor where you want to paste it and press right click and select paste, or use the keyboard shortcut of CTRL + V.
Example of the code from that Unit below

app.controller('MainController', ['$scope', function($scope) { 
  $scope.title = 'Top Sellers in Books'; 


ok thankyou I had figured it out, I am a new user to Mac so it took me a minute to learn how to copy and paste without the Control C


great stuff! I am afraid I am but a poor humble learner on Windows lol. :wink:


lol yeah I just left a Windows 10 pc so this is new learning experience for me


Hi, The js/controller/MainController code (typed or copied) keeps giving me the following error: "Oops! The test returned an error. Maybe you have a syntax error, or a typo. Hide error.
SyntaxError: Parse error, at /home/ccuser/workspace/angularjs-your-first-app/js/app.js:2" Any suggestions?
Is this a bug? Here's the code: app.controller('MainController', ['$scope', function($scope) {
$scope.title = 'Top Sellers in Books';



Hi @cherylspatrie,
Excuse the delay in reply here. If this is still an issue you not been able to overcome please feel free to post so and someone will try to help as soon as possible. If you were successful and managed to move on please feel free to post your solution so it may help others. :smile: