Recently, I have been delving into the world of AngularJS and encountered a perplexing constraint error:
$compile:tpload Error Loading Template
index.html:
<!DOCTYPE html>
<html ng-app="latihan7">
<head>
<title>Learn</title>
<script type="text/javascript" src="js/angular.min.js"></script>
</head>
<body>
<div header-page></div>
<script>
var app = angular.module('latihan7',[]);
app.directive('headerPage',function(){
return{
templateUrl : 'header.html'
}
});
</script>
</body>
</html>
header.html
<h2>test header</h2>