So for some reason the HTML page i'm trying to load with templateUrl is not showing up. The files are all in the same directory, console shows no error, it just doesn't load the page elements i'm trying to add. My directive is as simple as:
.directive('tagTeste',function(){
return{
templateUrl: 'templateUrl.html'
};
});
My template html i'm trying to load:
<!doctype html>
<html ng-app="teste">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
</head>
<body>
<table border="1" width="500" height="150">
<thead>
<tr>
<td>Nome</td>
<td>Telefone</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="pessoa in pessoas">
<td>{{pessoa.nome}}</td>
<td>{{pessoa.telefone}}</td>
</tr>
</tbody>
</table>
<form>
<p> Nome: <input type="text" ng-model="nomenovo" required> </p>
<p> Telefone: <input type="number" ng-model="numeronovo" required> </p>
<input type="button" ng-click="add()">
</form>
<body>
</html>
My index page:
<!doctype html>
<html ng-app="teste">
<head>
<h1 align="center">Table teste</h1>
<meta charset="utf-8">
<title>Teste</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="repeaterdirective.js"></script>
<script type="text/ng-template" id="templateUrl.html">
</head>
<div ng-controller="index" align="center">
<body>
<div tag-teste></div>
</body>
</div>
</html>
</div>after</body>in your index page just a typo?