I have an AngularJS app that currently works with the 1.2.9 angular version, but when I change the library version to 1.3.2, I get the following error:
Argument 'AlumnosController' is not a function, got undefined
view code:
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8">
<title>Cuaderno Alumnos</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body ng-controller="AlumnosController">
<h1>Cuaderno Alumnos</h1>
<div class="wrapper">
<div class="contact-item" ng-repeat="alumno in alumnos | orderBy:'nombre'">
<div class="nombre"> {{alumno.nombre}} - {{alumno.telefono}}</div>
<span class="curso">{{alumno.curso}} </span>
</div>
</div>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js" type="text/javascript"></script>
<script src= "AlumnosController.js" type="text/javascript"></script>
</body>
Controller code:
function AlumnosController($scope){
$scope.alumnos=[
{nombre:"Juan Blanco", telefono: "1234567890", curso:"Segundo ESO"},
{nombre:"Rosa Luxemburgo", telefono: "0987654321", curso:"Primero ESO"},
{nombre:"Alberto Herrera", telefono: "1122334455", curso:"Segundo ESO"},
{nombre:"Ana Mariño", telefono: "6677889900", curso:"Tercero ESO"}
];
}
Any ideas?