Error in app.js: I am facing an issue while setting up routes in my AngularJS application. When I click on 'Page 1', the URL should be '/employees' but it is showing as http://localhost:3000/#!#employees. Can someone please help me debug this problem?
var myapp = angular.module('myapp',['ngRoute'])
myapp.config(function($routeProvider){
console.log('in the routes')
$routeProvider
.when('/employees' ,{
templateUrl: 'templates/index.html',
controller: 'empController'
})
.when('/employees/create' ,{
templateUrl: 'templates/create.html',
controller: 'empController'
})
.when('/employees/:id/show' ,{
templateUrl: 'templates/show.html',
controller: 'empController'
})
.when('/employees/:id/edit' ,{
templateUrl: 'templates/edit.html',
controller: 'empController'
})
})
Error in index.html:
<body ng-app='myapp' ng-controller='empController'>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="">WebSiteName</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="">Home</a></li>
<li><a href="#/employees">Page 1</a></li>
<li><a href="#/employees/create">Page 2</a></li>
<li><a href="#/employees/:id/edit">Page 3</a></li>
<li><a href="#/employees/:id/show">Page 3</a></li>
</ul>
</div>
</nav>
<hr>
<div ng-view></div>