Created
June 10, 2015 20:53
-
-
Save chalettu/2198bb6f37fa8e69c99f to your computer and use it in GitHub Desktop.
sample code for angular route resolution
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
$urlRouterProvider.otherwise(function ($injector, $location) { | |
// console.log("loading main"); | |
if ($location.$$url === '/') { | |
// $urlRouterProvider.otherwise('/'); | |
// window.location = '/'; | |
} | |
else { | |
console.log("passing to webserver to handle it"); | |
// pass through to let the web server handle this request | |
window.location = $location.$$absUrl; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment