I'm new to AngularJS and I'm currently building a small application. I want my URL's like this /index (without the .html). I tried to use NgRoute for that, but it doesn't seem to work out well. When i go to /establishments, it says the route doesn't exists. Here is my code:
app.js
var app = angular.module('khApp', ['ngRoute','establishmentModule', 'queryModule', 'buildingBlockModule', 'categoryModule']);
app.config(['$routeProvider', function($routeProvider)
{
$routeProvider
.when('establishments', {controller:'testController', templateUrl: '../html/establishments.html'})
}]);
app.controller('testController', ['$http', function($http)
{
}]);
index.html
<div ng-controller="testController as test" class="container">
hi
<a href="establishments">
<button class="btn btn-default">Start</button>
</a>
</div>
<ng-view></ng-view>
<script type="text/javascript" src="../../bower_components/angular/angular.js"></script>
<script type="text/javascript" src="../../bower_components/angular-route/angular-route.js"></script>
<script type="text/javascript" src="../js/app.js"></script>
<script type="text/javascript" src="../js/buildingblock.js"></script>
<script type="text/javascript" src="../js/category.js"></script>
<script type="text/javascript" src="../js/establishment.js"></script>
<script type="text/javascript" src="../js/query.js"></script>
</body>
</html>
What am i doing wrong? Thanks in advance!