Issue
I noticed on Twitter's Website that it will keep the same Tweets and other information on the page even when you navigate between pages.
For Example:
I'm on the Twitter home page and see a post about a dog.
I go to the Twitter profile page and a few minutes later go back to the Twitter home page.
I still see the same post and it didn't have to load or anything.
How would I do that in Angular(Firebase)?
Solution
As I understand your goal is to preserve state (data) of your app while you are navigating between different tabs. I think 2 most popular choices in this case with Angular are:
Create a so called store for your application which will help you preserve state. Something like NGRX would do the job nicely in this case.
Don't use Angular routing but use some kind of tab's component that only hides html but does not remove your component from DOM itself.
P.S it does not matter what you use for backend. This is purely FE issue.
Answered By - Vaidas Masys
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.