Search Posts

Angularjs after using ‘location replace’, duplicated pages remained

In my code, logics are executed like belows.

  1. Showing items list in main page.
  2. Click one item and move to detail page.
  3. I wanna change something, so click edit button and move to edit page
  4. Edit some and finish editing with click the confirm button.
  5. When click the button, execute $state.go(toGo, params, {location: 'replace'});
  6. Then move to detail page.

Through these, location history has successive detail page

How can I remove this successive pages in history?

Or can I merge these?

I don’t know how to handle history.




Im using ‘ui-router’

Source: AngularJS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.