I have just completed task 27.
For some reason the handlebar expressions (not the content) {{title}}
{{body}}
and the Text from the <a>
link “Shop Now” are appearing at the top of the ‘homepage’.
I have written the template script within the tags so I don’t understand why they are visible in the body of the HTML at this stage since they haven’t been compiled…any ideas please?
My code for the template on index.html up until the opening body tag is:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Musicon</title>
<link href="public/style.css" rel="stylesheet">
<script src="handlebars.min.js"></script>
<script id="templateHB" type="text/x-handlebars-template">
<h1>{{title}}</h1>
<p>{{body}}</p>
<a href="store.html">Shop Now</a>
</script>
</head>
<body>
Link to exercise:
https://www.codecademy.com/paths/web-development/tracks/build-interactive-websites/modules/templating-with-handlebars/projects/musicon