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

Function cacheState

test/angular/1.7/angular.js:6686–6698  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6684 // This variable should be used *only* inside the cacheState function.
6685 var lastCachedState = null;
6686 function cacheState() {
6687 // This should be the only place in $browser where `history.state` is read.
6688 cachedState = getCurrentState();
6689 cachedState = isUndefined(cachedState) ? null : cachedState;
6690
6691 // Prevent callbacks fo fire twice if both hashchange & popstate were fired.
6692 if (equals(cachedState, lastCachedState)) {
6693 cachedState = lastCachedState;
6694 }
6695
6696 lastCachedState = cachedState;
6697 lastHistoryState = cachedState;
6698 }
6699
6700 function fireStateOrUrlChange() {
6701 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