MCPcopy Index your code
hub / github.com/angular-ui/ui-router / cacheState

Function cacheState

test/angular/1.6/angular.js:6595–6607  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6593 // This variable should be used *only* inside the cacheState function.
6594 var lastCachedState = null;
6595 function cacheState() {
6596 // This should be the only place in $browser where `history.state` is read.
6597 cachedState = getCurrentState();
6598 cachedState = isUndefined(cachedState) ? null : cachedState;
6599
6600 // Prevent callbacks fo fire twice if both hashchange & popstate were fired.
6601 if (equals(cachedState, lastCachedState)) {
6602 cachedState = lastCachedState;
6603 }
6604
6605 lastCachedState = cachedState;
6606 lastHistoryState = cachedState;
6607 }
6608
6609 function fireStateOrUrlChange() {
6610 var prevLastHistoryState = lastHistoryState;

Callers 2

BrowserFunction · 0.70
fireStateOrUrlChangeFunction · 0.70

Calls 3

isUndefinedFunction · 0.70
equalsFunction · 0.70
getCurrentStateFunction · 0.50

Tested by

no test coverage detected