<!DOCTYPE html>
<html lang="pt-br" ng-app="alurapic">
<head>
<meta charset="UTF-8">
<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">
<script src="js/lib/angular.min.js"></script>
<script src="js/main.js"></script>
<script src="js/controllers/fotos-controller.js"></script>
</head>
<body ng-controller='FotosController'>
<div class="container">
<h1 class="text-center">Alurapic</h1>
<img class="img-responsive" src="{{foto.url}}" alt="{{foto.titulo}}">
</div><!-- fim container -->
</body>
</html>
//////////////////////////////////////////////////////////////////
controller-fotos
angular.module('alurapic').controller('FotosController', function($scope) {
$scope.foto = {
titulo : 'Leão',
url : 'http://www.fundosanimais.com/Minis/leoes.jpg'
};
});
///////////////////////////////////////////////////////////////
main js
angular.module('alurapic', []);
///////////////////////////////////////
Erro que aparece
Uncaught SyntaxError: Unexpected token <
angular.min.js:102Error: [ng:areq] http://errors.angularjs.org/1.3.15/ng/areq?p0=FotosController&p1=not%20a%20function%2C%20got%20undefined
at angular.min.js:6
at Rb (angular.min.js:19)
at sb (angular.min.js:20)
at angular.min.js:75
at angular.min.js:57
at r (angular.min.js:7)
at B (angular.min.js:56)
at g (angular.min.js:51)
at g (angular.min.js:51)
at angular.min.js:50
fiz tudo igual ao Professor Flávio e não deu certo