Created
January 31, 2014 22:38
-
-
Save kalisjoshua/8744702 to your computer and use it in GitHub Desktop.
This file contains 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
// Async Before App Init | |
angular.module('app', [/*...*/]) | |
.config(function () { | |
// register all routes and stuff | |
}) | |
.run(function ($rootScope) { | |
$rootScope.$on('$stateChangeStart', function (AsyncValue) { | |
if (!AsyncValue.pageAvailable) { | |
// send back to home | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment