Hi,
I have a SPA built on ASP .NET with no DB connection. All data comes from SA which have APIs step configured in them.
I have numerous routes in the project such as /setup/:userid, /dash, /home/:userid etc.
On most routes, there are server connects which are set to auto-load. These server connects have parameters which are bound to query parameters such as params.userid, if any.
So, if I go to /setup/123, server connect loads with param set as 123.
Now, if I go to another page, say /dash, the SC on setup age loads again… this time with empty/NULL param.
This does not make sense. I am not even on the route page, where the SC is defined. So it should not have been even called.
Secondly, the param that I have is set to a local value - params.userid which is specific to that route. Why would that value even change (which invokes SC reload)? I have even tried setting the param as routeSetup.params.userid, but that does not make any difference.
Can someone please help me understand why this is not working and how is it supposed to work?
What I want & expect it should work like:
- When I get to setup page, the param value, if changed, should auto load the SC and fetch fresh data.
- If I redirect away from the setup page, that should NOT mean I have a different userid in params and it should NOT auto load the SC.
- Only if I come back to setup page via some other link, it should reload the SC, IFF param userid does not match from what it was earlier.
For eg:/setup/123>/dash>setup/444this should load SC twice - once for 123 & then for 444.
For eg:/setup/123>/dash>setup/123this should load SC just once for 123. - If I press browser back, in that case the param remains the same, so it should not reload the SC.
Please help me understand if what I require can be achieved in Wappler SPA?
