Unexpected Token

Asked

Viewed 53 times

0

I am making an application with Angularjs and the error "Uncaught Syntaxerror: Unexpected token <" is firing

Follow the code js

angular.module('alurapic').controller('FotoController', function ($scope) {
$scope.foto = {}

$scope.submeter = function () {
    console.log($scope.foto)
}
})

html

<!DOCTYPE html>
<html lang="pt-br" ng-app="alurapic" class="ng-scope">
<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">
</head>
 <body>
    <div class="container">
        <ng-view>

        </ng-view>
    </div> <!-- fim container -->
    <script src="js/lib/angular.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>
    <script src="js/lib/angular-animate.min.js"></script>
    <script src="js/lib/angular-route.min.js"></script>
    <script src="js/lib/controllers/foto-controller.js"></script>
</body>
</html>
  • You can play this error in jsFiddle or here in the Sopt widget?

  • lacked the brackets in angular.module('alurapic', []), but this error is related to something else I believe

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.