Created
September 9, 2014 08:17
-
-
Save ADmad/db758a8a287a829e4aad to your computer and use it in GitHub Desktop.
Clear sticky state locals.
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
diff --git a/src/stickyStateProvider.js b/src/stickyStateProvider.js | |
index 800c16a..1d89f09 100644 | |
--- a/src/stickyStateProvider.js | |
+++ b/src/stickyStateProvider.js | |
@@ -109,6 +109,16 @@ function $StickyStateProvider($stateProvider) { | |
}); | |
return states; | |
}, | |
+ clearInactiveState: function (name) { | |
+ var state = inactiveStates[name]; | |
+ if (!state) { | |
+ return false; | |
+ } | |
+ state.locals = null; | |
+ delete state.self.status; | |
+ delete inactiveStates[name]; | |
+ return true; | |
+ }, | |
getInactiveStatesByParent: function () { | |
return mapInactives(); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment