Created
August 6, 2014 18:52
-
-
Save mhairston/cc3c260233a68c148b02 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var initSessionPropertyOnce = function(prop,defaultVal) { | |
var savedValue = sessionStorage.getItem(prop); | |
if (!savedValue) { | |
sessionStorage.setItem(prop,defaultVal); | |
$scope.switchTabTo(defaultVal); | |
return defaultVal; | |
} else { | |
$scope.switchTabTo(savedValue); | |
return savedValue; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment