I have the following state configuration:
function stateConfig($stateProvider) {
$stateProvider
.state("home", {
url: "/",
templateUrl: "/app/home/template/home.html",
controller: "HomeController as homeController"
});
.state("user", {
abstract: true,
url: "/user",
template: "<ui-view/>"
})
.state("user.list", {
url: "/list",
templateUrl: "/app/user/template/user.list.html",
controller: "UserListController as userListController"
});
}
user.list.html contains a table of users, home.html constains the link to the user.list.html:
<a class="btn btn-primary" ui-sref="user.list" role="button">View All Users</a>
When I start the application and go to the localhost:8080, it displays me home.html. Then, when I click on the button "View All Users", it displays me user.list.html and I see a table of users. Evething works fine, but the problem starts when I try to reload the page (pressing F5) or when I manually navigate to the localhost:8080/user/list. It displays me 404 error page. My question is: why this is happening?