Did you change the value of title to your own String?


In first app, I completed first page and in second page despite title and h1 is correct, it always throw error:
Did you change the value of title to your own String?

Can someone please help, below is the code snippet and error screen shot is also uploaded.


var app = angular.module("myApp", []);


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


<!doctype html>
      <link href="https://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css" rel="stylesheet" />
    <link href='https://fonts.googleapis.com/css?family=Roboto:500,300,700,400' rel='stylesheet' type='text/css'>
    <link href="css/main.css" rel="stylesheet" />

    <!-- Include the AngularJS library -->
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script>
  <body ng-app="myApp">
    <div class="header">
      <div class="container">
        <h1>Book End</h1>

    <div class="main" ng-controller='MainController'>
      <div class="container">



    <div class="footer">
      <div class="container">
        <h2>Available for iPhone and Android.</h2>
        <img src="https://s3.amazonaws.com/codecademy-content/projects/shutterbugg/app-store.png" width="120px" />
        <img src="https://s3.amazonaws.com/codecademy-content/projects/shutterbugg/google-play.png" width="110px" />

    <!-- Modules -->
    <script src="js/app.js"></script>

    <!-- Controllers -->
    <script src="js/controllers/MainController.js"></script>



Could you give is the FULL HTML-code you are using as =text=......

edit your Post

  • leave one blank-line above of your code
  • select your code in the Post
  • then =click= on the </>-symbol-of-this-editor

Your code will then be in a pre-code state
and you will be able to make/present the proper indentations.

With Courtesy to stetim94

or even better use
= https://discuss.codecademy.com/t/how-do-i-format-code-in-my-posts/28351


Hello,thank you for reply, I have updated as per your guidance.


You must have understanding, how to work with objects

$scope is the object
and title is a property of this object
and with $scope.title you will get access to the associated string Value


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

You will have to remove
<img src="//codecademy-discourse.s3.amazonaws.com/original/4X/a/7/d/a7d69a5364257ee4e0a30212f05d4daf98c117db.jpg" width="689" height="312">
from the MainController.js



I would suggest you change 'Top Sellers in Books' into This is a test'
to then have
$scope.title = 'This is a test';


I am sorry, that was incorrect paste, my code is correct and actually I understand $scope and its relationship with controller and ui. Can you please help more?


I got the answer, it is asking me to change the text and I was keeping it the same, thank you for the help.


You meant the title text ???


Yeah, sorry, it was my bad, now it is solved. Thank you for all the help.