(Solved) Issue with passing params in $state.go()

I’m having an issue with $state.go(state, params). It doesn’t seem to be passing the params correctly.

Let me show it in my example here. Try to add grocery items to the shopping list.

  1. Click on ‘+’ at the top right corner. This will take you to the ‘Add Grocery’ view.
  2. Tap on ‘Milk’. It will take you to the ‘Grocery Details’ view.
  3. In Grocery Details view, you would see ‘Milk’. Now, click on ‘Add to Shopping List’ button. Milk gets added to the list and view transitions to ‘Shopping List’ page.

So far, it is fine.

  1. Now, try to add a new item to the list. Again click on ‘+’
  2. But, this time, tap on ‘Bread’.
  3. However, in the ‘grocery details’ view, it still shows ‘Milk’. It was supposed to show ‘Bread’.

Not sure, whats wrong in my code? Could you help me fix it?

Solved. Refer to https://github.com/driftyco/ionic/issues/3338 for the solution.