Estou tentando imprimir os dados de um arquivo JSON no html usando AngularJS, rodando tudo pelo XAMPP e na minha pasta htdocs/teste tem 3 arquivos (index.html, main.js, teste.json). O console não mostra nenhum erro, tentei inclusive debugar pelo firefox, coloquei um breakpoint no $http.get, mas nunca chega nesse ponto. Segue o código JS:
var app = angular.module('myApp', []);
app.controller("myCtrl", function ($http, $scope) {
$http.get('teste.json').then(function (response) {
$scope.myData = response;
});
});
JSON:
[{"id":"1","name":"John"},
{"id":"2","name":"Paul"}] </br/>
HTML:
<ul>
<li ng-repeat="data in myData">
{{data.id}}
{{data.name}}
</li>
</ul>