I am new to AngularJS. I have the following scenerios
Menu Items -- Home Page2 Page3 Page4
Remember, Home Page has HomeController
Page2 has Page2Controller
Page3 has Page3Controller
Page4 has Page4Controller
Each page has it's own init() function to get the data from the server and populate the initial data.
At the beginning, I have to call a different procedure for each page to populate different values for each page.
Now the question I have is as follows:
Step 1: I have logged onto the apps and it populates the Home Page values.
Step 2: I have clicked Page2 to get the initial data.
The same is true for Page3 and Page4 as well.
At this point, all the pages have the initial values.
Step 3:
Now, I would like to go back ( say, click Home) to Home page.
Is there any way I can check the values of Home page?
If the Home page has values, I do not want to call the Init() function.
Is it possible to not call the Init() function?
The idea is that if I do not have to call the Init() function after the 1st call, the apps would be very faster.
I would really appreciate your input in this regard.
Thanks