This is a newbie question for sure....

Let's say I have two components A & B -- A shows an ag-grid of addresses, 
and B shows an ag-grid of people.  In the ngInit() section of each 
component I call an API service to bring these two data sets down from the 
back end.  The way I have it now, I make the data call in the ngInit() 
section so I reload the data each time I move from one component to 
another.  

The data on the back end doesn't change much in a given session, so I'm 
wondering if I can *conditionally* call the data service depending on 
whether I've been in this component previously and perhaps add a "refresh" 
button if I really wanted a fresh data download..  I've considered using 
local storage to help me determine if I've visited a component before, but 
I'm thinking there must be a better way.

Also, I'm wondering if the ag-grid data in component A will persist as I 
move away from the component A to B, and then return.

Any guidance will be most appreciated!

Harry




-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to