Hello, I'm following a course of the codeschool on Angular and all the examples that I make with the angular do not work, they are very simple thing. I'm going to post the code for someone to tell me what I'm doing wrong.
// app.js
(function () {
var app = angular.module('store', []);
app.controller('StoreController', function () {
this.product = gem;
});
var gem = {
name: 'Dodecahedron',
price: 2.95,
description: 'Alguma descrição',
}
})();
<!--index.html-->
<!DOCTYPE html>
<html>
<head ng-app="store">
<meta charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<title></title>
</head>
<body>
<script type="text/javascript" src="app.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script><divng-controller="StoreController as store">
<h1> {{store.product.name}} </h1>
<h2> {{store.product.price}} </h2>
<p> {{store.product.description}} </p>
</div>
</body>
</html>
The result that is coming out is this:
{{store.product.name}}
{{store.product.price}}
{{store.product.description}}
Can anyone help me? Thank you.