new AppStateManager(mainRoutingInfo)
Parameters:
Name | Type | Description |
---|---|---|
mainRoutingInfo |
Array.<RoutingInfo> |
- Source:
Methods
generateBaseAppState(pageTitle, url) → {AppHistoryState}
Generate the base app state (without stack entry)
Parameters:
Name | Type | Description |
---|---|---|
pageTitle |
string | |
url |
string | Must be the full url with queries (shown in address bar) |
- Source:
Returns:
- Type
- AppHistoryState
getBaseAppStateFromMainNavID(navBtnLinkSelector, targetBaseUrl, fullUrl) → {AppHistoryState}
Gets the base page history state for the window history state API using a combination of the
navBtnLinkSelector and basePageUrl
The generated app state's stack entry has not been normalized
Use targetBaseUrl cause of queries
Parameters:
Name | Type | Description |
---|---|---|
navBtnLinkSelector |
string | |
targetBaseUrl |
string | |
fullUrl |
string | targetBaseUrl with queries |
- Source:
Returns:
- Type
- AppHistoryState
normalizeGeneratedAppState(generatedState)
Normalize generated app state
Call if routing to new url thus forward records will be trashed by browser
Parameters:
Name | Type | Description |
---|---|---|
generatedState |
AppHistoryState |
polyfillPreviousState()
WORKED WITH IMPLEMENTATION WHERE THIS WAS YET TO BE DEFINED.
Otherwise, will never do anything.
NOTE. If implementation ever changes, then deal with the bug of currentStackEntry never being updated
thus polyfilling next back pop with same value, making back determination difficult.
Call when state has been popped (moved back)
Help to polyfill in case previous (back state records) have no stack entry
Only possible for back movements (cause state was yet to be set with new method)
- Source: