Não lembro exatamente em qual arquivo estava mexendo, então colei todos.
****************Console*********************
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.3.15/$injector/modulerr?p0=alurapic&p1=TypeEr…20Jd%20(http%3A%2F%2Flocalhost%3A3000%2Fjs%2Flib%2Fangular.min.js%3A17%3A1)
at angular.min.js:6
at angular.min.js:35
at r (angular.min.js:7)
at g (angular.min.js:34)
at ab (angular.min.js:38)
at d (angular.min.js:17)
at uc (angular.min.js:18)
at Jd (angular.min.js:17)
at angular.min.js:250
at HTMLDocument.a (angular.min.js:164)
(anonymous) @ angular.min.js:6
(anonymous) @ angular.min.js:35
r @ angular.min.js:7
g @ angular.min.js:34
ab @ angular.min.js:38
d @ angular.min.js:17
uc @ angular.min.js:18
Jd @ angular.min.js:17
(anonymous) @ angular.min.js:250
a @ angular.min.js:164
c @ angular.min.js:32
DevTools failed to parse SourceMap: http://localhost:3000/js/lib/angular.min.js.map
DevTools failed to parse SourceMap: http://localhost:3000/js/lib/angular-animate.min.js.map
DevTools failed to parse SourceMap: http://localhost:3000/js/lib/angular-resource.min.js.map
DevTools failed to parse SourceMap: http://localhost:3000/js/lib/angular-route.min.js.map
Está tudo dentro da pasta public
****************index.html*********************
<!DOCTYPE html>
<html lang="pt-br" ng-app="alurapic">
<head>
<meta charset="UTF-8">
<base href="/">
<meta name="viewport" content="width=device-width">
<title>Alurapic</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/efeitos.css">
<script src="js/lib/angular.min.js"></script>
<script src="js/lib/angular-animate.min.js"></script>
<script src="js/lib/angular-resource.min.js"></script>
<script src="js/lib/angular-route.min.js"></script>
<script src="js/main.js"></script>
<script src="js/controllers/fotos-controller.js"></script>
<script src="js/directives/minhas-diretivas.js"></script>
</head>
<body>
<div class="container">
<ng-view></ng-view>
</div>
</body>
</html>
****************partials/principal.html*********************
<div class="jumbotron">
<h1 class="text-center">Alurapic</h1>
</div>
<div class="row">
<div class="col-md-12">
<form>
<input ng-model="filtro" ng-model-options="{debounce: 500}" type="text" class="form-control" placeholder="filtrar" />
</form>
</div>
</div>
<div class="row">
<meu-painel ng-repeat="foto in fotos | filter: filtro" titulo="{{foto.titulo}}" class="col-md-2 painel-animado">
<img src="{{foto.url}}" title="{{foto.titulo}}" class="img-responsive center-block" />
</meu-painel>
</div>
**************js/directives/meu-painel.html***********************
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title text-center">{{titulo}}</h3>
</div>
<div class="panel-body" ng-transclude>
</div>
</div>
****************js/directives/minhas-diretivas.js*********************
angular.module('minhasDiretivas', []).directive('meuPainel', function() {
var ddo = {};
ddo.restrict = "AE";
ddo.scope = {
titulo : '@'
}
ddo.transclude = true;
ddo.templateUrl = 'js/directives/meu-painel.html'
return ddo;
});
****************js/main.js*********************
angular.module('alurapic', ['minhasDiretivas', 'ngAnimate', 'ngRoute', 'ngResource']).config(function($routeProvider, $locationProvider) {
$locationProvider.html5mode(true);
$routeProvider.when('/fotos', {
templateUrl : 'partials/principal.html',
controller : 'FotosController'
});
$routeProvider.when('/fotos/novo', {
templateUrl : 'partials/cadastro.html',
controller : 'FotosController'
});
$routeProvider.otherwise({ redirectTo: '/fotos' });
});
****************js/controllers/fotos-controller.js*********************
angular.module('alurapic').controller('FotosController', function($scope, $http) {
$scope.fotos = [];
$scope.filtro = '';
$http.get('v1/fotos').success(function(fotos) {
$scope.fotos = fotos;
}).error(function(erro) {
console.log(erro);
});
});