In the LearnAngularJS module of CodeAcademy section 1 , I typed in the commands :
var app = angular.module(“myApp” ,
);
and got this error message :
expected body to have an attribute ng-app equals to myApp
Any ideas how can I resolve this error ?
HI, please move your topic to ANGULAR JS. This is just a question of keeping the topic in the right category so your topic gets more chance of being seen.
Ok … i just created a new topic in the AngularJS forum
I corrected it and deleted duplicate
You need to open the folder and locate index.html folder under there you need to edit the body tag to:
<body ng-app="myApp">
*The folder icon is on the left of the tab angular.js
zainabrawat:
<body ng-app=“myApp”>
zainabrawat:
<body ng-app=“myApp”>
I see a whole chunk of code in index.html … where do I type ?
There’s already a body tag you need to just edit it
Where in the code do I type <body ng-app="myApp">
?
<!doctype html>
<html>
<head>
<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>
</head>
<body>
<div class="header">
<div class="container">
<h1>Book End</h1>
</div>
</div>
<div class="main">
<div class="container">
<h1> </h1>
</div>
</div>
<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" />
</div>
</div>
<!-- Modules -->
<script src="js/app.js"></script>
<!-- Controllers -->
<script src="js/controllers/MainController.js"></script>
Hmm it still doesn’t seem to work even after i edited both tags in index.html
gengyang:
</head>
<body>
This body tag…
Refresh and try again if you still get error let me know what the error is
ok it works now … i have managed to progress to step 4 of the instructions. Gonna take a break now and come back later. This is a nice forum to meet friendly people … lol
Glad
Thank you
Happy Learning
Happy coding !
What inspired you to learn programming/coding?
Join the discussion
zainabr1
Split this topic
January 17, 2017, 4:57pm
13
A post was split to a new topic: Angular .2