I'm not able to display expression in AngularJS. Below is my the HTML code.
<!DOCTYPE html>
<html data-ng-app="appname">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
<script src="javascript.js"></script>
</head>
<body>
<div data-ng-controller="appCtrl">
<p>{{appname.product.name}}</p>
</div>
</body>
</html>
This is javascript.js file:
(function () {
var appname = angular.module('appname', []);
var gem = {
name: "Ring",
price: 2.9,
Description: "",
};
appname.controller('appCtrl', function () {
this.product = gem;
});
});
The webpage still displays: {{appname.product.name}}.
()near the end.