angularjs - How to remove last page with using $window.history.back() -


in code, logics executed belows.

  1. showing items list in main page.
  2. click 1 item , move detail page.
  3. i wanna change something, click edit button , move edit page.
  4. edit , finish editing click confirm button.
  5. when click button, execute $state.go('root.detail', {cat_id : $scope.cat_id}, {location: 'replace'});.
  6. then move detail page.

through these, location history has successive detail page.

i know cannot handle history.

and think using $window.histroy.back(); more appropriate instead of using

$state.go('root.detail', {cat_id : $scope.cat_id}, {location: 'replace'});

to remove history.

anyone have idea solve this?

.

.

.

i add paint files make easy understanding want. :)

1. enter image description here

2. enter image description here

3. enter image description here


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -