How can the router change views based on the URI?
The current router setup is as follows:
$stateProvider
.state('main', {
url: "",
views: {
"header": { templateUrl: "partials/header.html"},
"mainContent": { templateUrl: "partials/mainContent.html"},
"footer": { templateUrl: "partials/footer.html"}
}
})
.state('lesson', {
url: "/1",
views: {
"header": { templateUrl: "partials/header.html"},
"mainContent": { templateUrl: "partials/lesson.html"},
"footer": { templateUrl: "partials/footer.html"}
}
})
When accessing localhost/
The main state is displayed.
However, when navigating to localhost/1, the main state is still shown.
What could be causing this issue?