Strange state navigation in my case

I want to nagivate from page A to B, so in my page A (history.html) view I did this

<a href="#/history/{{}}">
    <li class="item">

and in my app.js the state is set like this

.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’

so supposedly it should be fine but it navigated to somewhere, what else is needed? am I miss something? I visit the link manually by adding some numbers at the end, eg http://localhost:8100/#/app/history/123 and it worked just fine.

Please try using ui-sref when possible.

<a ui-sref="app.history2 ({})"> <li class="item"> {{data.items}} </li> </a>

Tried but when I clicked, nothing happened… I use
because previously it worked, I use the sidemenu template given by ionic throught the CI.

I saw this in my console

Error: Could not resolve ‘app.history2 123’ from state ‘app.history’

Sorry, I didn’t have time to test it haha
The corrent syntax is:


  • {{data.items}}
  • `