Skip to content
This repository has been archived by the owner on Jan 10, 2018. It is now read-only.

How to handle Ngrx loading when browser back button..it will hit again replacing the state Object #462

Closed
Naveenshri opened this issue Sep 14, 2017 · 1 comment

Comments

@Naveenshri
Copy link

Naveenshri commented Sep 14, 2017

M calling service in my component
For example
m calling service ngInit to assign the state as well
ngInit() {
here based on some condition dispatch the Action assign in the state objects
dispatch action(customer Id)
}
In that page m having sub pages as well when i click navigate another page and come back previous page again,using browser back button or click back button.

NgOnit again called to replace the state object

Expected:when i come previous page to parent page instead of hitting the service again i will get state to assign my component

How to avoid calling ngInit() ?

kindly give me the solution for that behavior

@Naveenshri Naveenshri changed the title Ngrx loading issue when click back button How to handle Ngrx loading when browser back using back button..it will hit again replacing the state Object Sep 14, 2017
@Naveenshri Naveenshri changed the title How to handle Ngrx loading when browser back using back button..it will hit again replacing the state Object How to handle Ngrx loading when browser back button..it will hit again replacing the state Object Sep 14, 2017
@robwormald
Copy link
Contributor

Please do not use Github for "how-to" requests - take them to https://gitter.im/ngrx/platform. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants