AngularJs: el controlador se llama dos veces usando $ routeProvider
Módulo de rutas:
var switchModule = angular.module('switchModule', []);
switchModule.config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/build-content', {templateUrl: 'build-content.html', controller: BuildInfoController});
}]);
Controlador:
function BuildInfoController($http, $scope){
alert("hello");
}
HTML:
<html ng-app="switchModule">
...
<body>
<ul>
<li><a href="#build-content"/></a></li>
</ul>
<div class="ng-view"></div>
</body>
...
Cada vez que hago clic en el hipervínculo '', se llamará al 'BuildInfoController' dos veces. ¿Me estoy perdiendo de algo?