What is the best way to maintain status between routes with Angular?

Asked

Viewed 132 times

1

I have a search screen where I have some filters, after I have done the filters, I can click on the records and go to a "details" screen and then I can edit or go back to the search screen.

What is the best way to maintain status between these pages?

I know it is possible to do with a service "Singleton", I can also use the localStorage or sessionStorage.

What would be the most elegant shape? Angular has some solution in the "package"?

  • 1

    you have to use localStorage even, if you want to do it in a more elegant way you can have a state manager like ngrx.

  • I will take a look at this ngrx, I still don’t like using localStorage =(... but for now I have chosen to create a service Singleton

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.