I've a file of index.html that has
<ui-view></ui-view>
in the body and below is my route.js :
var app = angular.module('dashboard', ['ui.router']);
app.config(['$stateProvider','$urlRouterProvider','$locationProvider', function($stateProvider, $urlRouterProvider, $locationProvider) {
$locationProvider.html5Mode(true);
$urlRouterProvider.otherwise('/');
$stateProvider
.state("home", {
url: "/",
template:"<h1>home</h1>"
})
.state("dashboard", {
url: "/dashboard",
templateUrl: "templates/dashboard.html",
controller: "controllers/dashboardCtrl"
})
}]);
but I get error of Cannot GET /dashboard I wonder why. I did have a folder called templates and has a dashboard.html in it.