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.
- Click on ‘+’ at the top right corner. This will take you to the ‘Add Grocery’ view.
- Tap on ‘Milk’. It will take you to the ‘Grocery Details’ view.
- 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.
- Now, try to add a new item to the list. Again click on ‘+’
- But, this time, tap on ‘Bread’.
- 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?