In order to navigate from page A to B, I included the following code in my page A (history.html) view:
<a href="#/history/{{data.id}}">
<li class="item">
{{data.items}}
</li>
</a>
In my app.js file, I set the state as follows:
.state('app.history', {
url: "/history",
views: {
'menuContent': {
templateUrl: "templates/history.html",
controller: 'historyCtrl'
}
}
})
.state('app.history2', {
url: "/history/:id",
views: {
'menuContent': {
templateUrl: "templates/history2.html",
controller: 'history2Ctrl'
}
}
})
Despite these steps, the navigation did not work properly. What else do I need to include? When I manually visit the link and add some numbers at the end like this http://localhost:8100/#/app/history/123, it functions correctly.